Merge "Add endpoint capability to Compute (cf spec)"

This commit is contained in:
Jenkins 2016-08-26 22:17:36 +00:00 committed by Gerrit Code Review
commit 55a80b0ef7
4 changed files with 31 additions and 0 deletions

View File

@ -70,6 +70,8 @@ node_types:
type: tosca.capabilities.OperatingSystem
scalable:
type: tosca.capabilities.Scalable
endpoint:
type: tosca.capabilities.Endpoint.Admin
requirements:
- local_storage:
capability: tosca.capabilities.Attachment

View File

@ -0,0 +1,21 @@
tosca_definitions_version: tosca_simple_yaml_1_0
topology_template:
node_templates:
server:
type: tosca.nodes.Compute
capabilities:
host:
properties:
disk_size: 10 GB
num_cpus: 1
mem_size: 4096 MB
os:
properties:
architecture: x86_64
type: Linux
distribution: Ubuntu
version: 14.04
endpoint:
properties:
network_name: PUBLIC

View File

@ -71,6 +71,7 @@ class ToscaDefTest(TestCase):
# we SHOULD test symbolic capability names as well
self.assertEqual(
['tosca.capabilities.Container',
'tosca.capabilities.Endpoint.Admin',
'tosca.capabilities.Node',
'tosca.capabilities.OperatingSystem',
'tosca.capabilities.Scalable',

View File

@ -198,6 +198,7 @@ class ToscaTemplateTest(TestCase):
compute_type = NodeType(tpl.type)
self.assertEqual(
sorted(['tosca.capabilities.Container',
'tosca.capabilities.Endpoint.Admin',
'tosca.capabilities.Node',
'tosca.capabilities.OperatingSystem',
'tosca.capabilities.network.Bindable',
@ -805,3 +806,9 @@ class ToscaTemplateTest(TestCase):
os.path.dirname(os.path.abspath(__file__)),
"data/test_containers.yaml")
ToscaTemplate(tosca_tpl)
def test_endpoint_on_compute(self):
tosca_tpl = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"data/test_endpoint_on_compute.yaml")
ToscaTemplate(tosca_tpl)