Merge "Add endpoint capability to Compute (cf spec)"
This commit is contained in:
commit
55a80b0ef7
@ -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
|
||||
|
21
toscaparser/tests/data/test_endpoint_on_compute.yaml
Normal file
21
toscaparser/tests/data/test_endpoint_on_compute.yaml
Normal 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
|
@ -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',
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user