Difference between revisions of "Solum/specify-lang-pack-design"
< Solum
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: | ||
Line 33: | Line 33: | ||
} | } | ||
} | } | ||
+ | |||
+ | 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-python-3.3 | ||
+ | description: 'This is Python language pack', | ||
+ | tags: ['Python3.3'] | ||
+ | }, | ||
+ | { name: 'Java language pack' | ||
+ | type:language-pack-java-1.6 | ||
+ | description: 'This is Java language pack', | ||
+ | tags: ['Java 1.6'] | ||
+ | } | ||
+ | ] |
Revision as of 16:20, 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:Java-1.4.2}, {language-pack: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: pyc content: { href: helloworld } requirements: requirement_type: interpreted_by fulfillment: id:py3.3 } services: { id:py3.3 characteristics: characteristic_type: solum:language-pack:python3.3 }
}
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-python-3.3 description: 'This is Python language pack', tags: ['Python3.3'] }, { name: 'Java language pack' type:language-pack-java-1.6 description: 'This is Java language pack', tags: ['Java 1.6'] }
]