From 0d0c3a75b7277d75f8a9d84349f361bb1de42cd3 Mon Sep 17 00:00:00 2001 From: Vahid Hashemian Date: Fri, 17 Jul 2015 20:34:27 -0700 Subject: [PATCH] Sync network examples with the spec Sync two network examples with the spec: - Network 1: Server bound to a new network - Network 2: Server bound to an existing network Change-Id: I5f0dfa2d6a3d6e9c3fdc2ecbe4a10f1e16b2c768 Partial-Bug: #1475807 --- translator/hot/tosca/tosca_compute.py | 4 ++++ .../tests/data/network/tosca_one_server_one_network.yaml | 7 +++++-- .../data/network/tosca_server_on_existing_network.yaml | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/translator/hot/tosca/tosca_compute.py b/translator/hot/tosca/tosca_compute.py index a0f5e2ea..c6f005be 100755 --- a/translator/hot/tosca/tosca_compute.py +++ b/translator/hot/tosca/tosca_compute.py @@ -49,6 +49,10 @@ IMAGES = {'ubuntu-software-config-os-init': {'architecture': 'x86_64', 'type': 'Linux', 'distribution': 'CirrOS', 'version': '0.3.1'}, + 'cirros-0.3.2-x86_64-uec': {'architecture': 'x86_64', + 'type': 'Linux', + 'distribution': 'CirrOS', + 'version': '0.3.2'}, 'rhel-6.5-test-image': {'architecture': 'x86_64', 'type': 'Linux', 'distribution': 'RHEL', diff --git a/translator/toscalib/tests/data/network/tosca_one_server_one_network.yaml b/translator/toscalib/tests/data/network/tosca_one_server_one_network.yaml index a485d703..ee6b9eab 100644 --- a/translator/toscalib/tests/data/network/tosca_one_server_one_network.yaml +++ b/translator/toscalib/tests/data/network/tosca_one_server_one_network.yaml @@ -1,9 +1,10 @@ tosca_definitions_version: tosca_simple_yaml_1_0 description: > - TOSCA simple profile with 1 network and 1 attached server + TOSCA simple profile with 1 server bound to a new network topology_template: + inputs: network_name: type: string @@ -24,15 +25,17 @@ topology_template: type: Linux distribution: CirrOS version: 0.3.2 + my_network: type: tosca.nodes.network.Network properties: + network_name: { get_input: network_name } ip_version: 4 cidr: '192.168.0.0/24' - network_name: { get_input: network_name } start_ip: '192.168.0.50' end_ip: '192.168.0.200' gateway_ip: '192.168.0.1' + my_port: type: tosca.nodes.network.Port requirements: diff --git a/translator/toscalib/tests/data/network/tosca_server_on_existing_network.yaml b/translator/toscalib/tests/data/network/tosca_server_on_existing_network.yaml index 3029c0f2..7fedc130 100644 --- a/translator/toscalib/tests/data/network/tosca_server_on_existing_network.yaml +++ b/translator/toscalib/tests/data/network/tosca_server_on_existing_network.yaml @@ -1,7 +1,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0 description: > - TOSCA simple profile with 1 server attached to existing network + TOSCA simple profile with 1 server bound to an existing network topology_template: inputs: @@ -24,10 +24,12 @@ topology_template: type: Linux distribution: CirrOS version: 0.3.2 + my_network: type: tosca.nodes.network.Network properties: network_name: { get_input: network_name } + my_port: type: tosca.nodes.network.Port requirements: