From 7940f982fbd8424067b52ce87f989a8d3d238bb5 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Fri, 7 Aug 2015 13:35:45 +0200 Subject: [PATCH] Fix node network resource Signed-off-by: Bogdan Dobrelya --- examples/openstack/openstack.py | 9 +++------ resources/node_network_puppet/meta.yaml | 6 +++--- resources/node_network_puppet/test.py | 2 +- templates/nodes_network.yml | 8 ++++---- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/examples/openstack/openstack.py b/examples/openstack/openstack.py index bf211f7..8436fe4 100755 --- a/examples/openstack/openstack.py +++ b/examples/openstack/openstack.py @@ -63,12 +63,9 @@ def setup_resources(): # NETWORKING - node1_network_puppet = vr.create('node1_network_puppet', 'resources/node_network_puppet', {})[0] - node2_network_puppet = vr.create('node2_network_puppet', 'resources/node_network_puppet', {})[0] + # TODO(bogdando) node's IPs should be populated as br-mgmt IPs, but now are hardcoded in templates signals.connect(node1, node1_sdn) signals.connect(node1, node2_sdn) - signals.connect(node1_sdn, node1_network_puppet) - signals.connect(node2_sdn, node2_network_puppet) # MARIADB mariadb_service1 = vr.create('mariadb_service1', 'resources/mariadb_service', { @@ -628,7 +625,7 @@ def setup_resources(): resources_to_run = [ - 'node1_network_puppet', + 'node1_sdn', 'rabbitmq_service1', 'openstack_vhost', @@ -682,7 +679,7 @@ resources_to_run = [ 'nova_conductor_puppet', 'nova_scheduler_puppet', - 'node2_network_puppet', + 'node2_sdn', 'glance_db', 'glance_db_user', diff --git a/resources/node_network_puppet/meta.yaml b/resources/node_network_puppet/meta.yaml index c9cb854..4ddd4d4 100644 --- a/resources/node_network_puppet/meta.yaml +++ b/resources/node_network_puppet/meta.yaml @@ -1,4 +1,4 @@ -id: l23network_puppet +id: node_network_puppet handler: puppet puppet_module: l23network version: 1.0.0 @@ -44,7 +44,7 @@ input: version: str!, provider: str!, interfaces: {}, - transformations: {}, + transformations: [{}], endpoints: {}, roles: {}, } @@ -63,4 +63,4 @@ input: schema: str! value: -tags: [resources/l23network, resources/node_network] +tags: [resources/node_network] diff --git a/resources/node_network_puppet/test.py b/resources/node_network_puppet/test.py index 0ab8703..56f5d05 100644 --- a/resources/node_network_puppet/test.py +++ b/resources/node_network_puppet/test.py @@ -4,7 +4,7 @@ from solar.core.log import log def test(resource): - log.debug('Testing l23network_puppet') + log.debug('Testing node_network_puppet') # requests.get( # 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value) # TODO(bogdando) figure out how to test this diff --git a/templates/nodes_network.yml b/templates/nodes_network.yml index 2701553..e21b2c3 100644 --- a/templates/nodes_network.yml +++ b/templates/nodes_network.yml @@ -4,10 +4,10 @@ id: simple_multinode_gre # eth0 - ext 192.168.121.0/24 resources: - id: node1_sdn - from: resources/node_network + from: resources/node_network_puppet values: network_scheme: - version: 1.1 + version: '1.1' provider: lnx interfaces: eth0: @@ -67,10 +67,10 @@ resources: fw-admin: br-fw-admin - id: node2_sdn - from: resources/node_network + from: resources/node_network_puppet values: network_scheme: - version: 1.1 + version: '1.1' provider: lnx interfaces: eth0: