Difference between revisions of "Solum/specify-lang-pack-design"
< Solum
(Created page with "Reference BP: https://blueprints.launchpad.net/solum/+spec/specify-lang-pack Proposed Implementation: ------------------------------------- 1) Get available language packs: ...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Reference BP: https://blueprints.launchpad.net/solum/+spec/specify-lang-pack | Reference BP: https://blueprints.launchpad.net/solum/+spec/specify-lang-pack | ||
− | Proposed Implementation: | + | Proposed Implementation 1: |
− | ------------------------------------- | + | -------------------------------------- |
1) Get available language packs: | 1) Get available language packs: | ||
− | GET /language-packs | + | GET /v1/language-packs |
Return: | Return: | ||
[ | [ | ||
− | {language-pack:Java-1. | + | {language-pack:org.openstack.java.Java-1.6}, |
− | {language-pack:python3.3} | + | {language-pack:org.openstack.python.python3.3} |
] | ] | ||
2) Specify language pack to be used as part of the application plan: | 2) Specify language pack to be used as part of the application plan: | ||
− | POST /assemblies | + | POST /v1/assemblies |
{ | { | ||
camp_version: CAMP 1.1 | camp_version: CAMP 1.1 | ||
artifacts: { | artifacts: { | ||
− | artifact_type: pyc | + | artifact_type: org.openstack.python.pyc |
content: { href: helloworld } | content: { href: helloworld } | ||
requirements: | requirements: | ||
− | requirement_type: 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 |
} | } | ||
} | } | ||
+ | |||
+ | 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 <--- 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'] | ||
+ | } | ||
+ | ] |
Latest revision as of 16:33, 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 <--- 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'] }
]