Difference between revisions of "Solum/specify-lang-pack-design"
< Solum
Line 10: | Line 10: | ||
Return: | Return: | ||
[ | [ | ||
− | {language-pack:Java-1.6}, | + | {language-pack:org.openstack.java.Java-1.6}, |
− | {language-pack:python3.3} | + | {language-pack:org.openstack.python.python3.3} |
] | ] | ||
Line 25: | Line 25: | ||
requirements: | requirements: | ||
requirement_type: org.openstack.interpreted_by | requirement_type: org.openstack.interpreted_by | ||
− | fulfillment: id: | + | fulfillment: id:py33 |
} | } | ||
services: { | services: { | ||
− | id: | + | id:py33 |
characteristics: | characteristics: | ||
− | characteristic_type: | + | characteristic_type: org.openstack.python.python3.3 <--- Specify existing language pack |
} | } | ||
} | } | ||
Line 48: | Line 48: | ||
[ | [ | ||
{ name: 'Python language pack' | { name: 'Python language pack' | ||
− | type:language-pack:python3.3 | + | type:language-pack:org.openstack.python.python3.3 <--- Component type identifies that this component is a language pack |
description: 'This is Python language pack', | description: 'This is Python language pack', | ||
− | tags: [' | + | tags: ['Python 3.3 Language Pack'] |
}, | }, | ||
{ name: 'Java language pack' | { name: 'Java language pack' | ||
− | type:language-pack:Java-1.6 | + | type:language-pack:org.openstack.java.Java-1.6 |
description: 'This is Java language pack', | description: 'This is Java language pack', | ||
− | tags: ['Java 1.6'] | + | tags: ['Java 1.6 Language Pack'] |
} | } | ||
] | ] |
Revision as of 16:32, 9 December 2013
Reference BP: https://blueprints.launchpad.net/solum/+spec/specify-lang-pack
Proposed Implementation 1:
1) Get available language packs:
GET /v1/language-packs
Return: [
{language-pack:org.openstack.java.Java-1.6}, {language-pack:org.openstack.python.python3.3}
]
2) Specify language pack to be used as part of the application plan:
POST /v1/assemblies
{
camp_version: CAMP 1.1 artifacts: { artifact_type: org.openstack.python.pyc content: { href: helloworld } requirements: requirement_type: org.openstack.interpreted_by fulfillment: id:py33 } services: { id:py33 characteristics: characteristic_type: org.openstack.python.python3.3 <--- Specify existing language pack }
}
Reference: https://lists.oasis-open.org/archives/camp-comment/201312/msg00003.html
Proposed Implementation 2 for GET:
If we consider language packs as being a 'component', then the GET call would need to change to something like:
GET /v1/components/
Return: [
{ name: 'Python language pack' type:language-pack:org.openstack.python.python3.3 <--- Component type identifies that this component is a language pack description: 'This is Python language pack', tags: ['Python 3.3 Language Pack'] }, { name: 'Java language pack' type:language-pack:org.openstack.java.Java-1.6 description: 'This is Java language pack', tags: ['Java 1.6 Language Pack'] }
]