From 78072d659b3d2537775d435cba16442dde4ce836 Mon Sep 17 00:00:00 2001 From: vic Date: Tue, 19 Mar 2013 13:58:41 +0400 Subject: [PATCH] Replace netmask in tests and provisioning --- deployment/mcollective/astute/bin/openstack_system | 12 +++++++++++- deployment/mcollective/astute/samples/config.yaml | 2 ++ fuel_test/ci/ci_base.py | 3 +++ fuel_test/manifest.py | 6 ++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/deployment/mcollective/astute/bin/openstack_system b/deployment/mcollective/astute/bin/openstack_system index 28219639c4..283e5a9187 100644 --- a/deployment/mcollective/astute/bin/openstack_system +++ b/deployment/mcollective/astute/bin/openstack_system @@ -150,6 +150,14 @@ class ConfigYaml self.mandatory('mirror_type') end + def public_netmask() + self.mandatory('public_netmask') + end + + def internal_netmask() + self.mandatory('internal_netmask') + end + def template() self.obligatory('template') end @@ -269,7 +277,9 @@ class Manifest :dns_nameservers => config.dns_nameservers(), :default_gateway => config.default_gateway(), :segment_range => config.segment_range(), - :repo_proxy => config.repo_proxy() + :repo_proxy => config.repo_proxy(), + :public_netmask => config.public_netmask(), + :internal_netmask => config.internal_netmask(), ) if config.swift() diff --git a/deployment/mcollective/astute/samples/config.yaml b/deployment/mcollective/astute/samples/config.yaml index 3afcab917a..b80557a905 100644 --- a/deployment/mcollective/astute/samples/config.yaml +++ b/deployment/mcollective/astute/samples/config.yaml @@ -28,6 +28,8 @@ common: internal_interface: eth0 public_interface: eth1 private_interface: eth2 + public_netmask: 255.255.255.0 + internal_netmask: 255.255.255.0 default_gateway: 10.0.1.100 nagios_master: fuel-controller-01.your-domain-name.com loopback: loopback diff --git a/fuel_test/ci/ci_base.py b/fuel_test/ci/ci_base.py index 5194911c28..c22af52c00 100644 --- a/fuel_test/ci/ci_base.py +++ b/fuel_test/ci/ci_base.py @@ -165,5 +165,8 @@ class CiBase(object): def internal_net_mask(self): return str(IPNetwork(self.environment().network_by_name('internal').ip_network).netmask) + def public_net_mask(self): + return str(IPNetwork(self.environment().network_by_name('public').ip_network).netmask) + def public_network(self): return str(IPNetwork(self.environment().network_by_name('public').ip_network)) diff --git a/fuel_test/manifest.py b/fuel_test/manifest.py index a6ef17a698..19c6605509 100644 --- a/fuel_test/manifest.py +++ b/fuel_test/manifest.py @@ -218,6 +218,8 @@ class Manifest(object): enable_test_repo=TEST_REPO, deployment_id = self.deployment_id(ci), use_syslog=use_syslog, + public_netmask = ci.public_net_mask(), + internal_netmask = ci.internal_net_mask(), ) if is_not_essex(): template.replace( @@ -274,6 +276,8 @@ class Manifest(object): ntp_servers=['pool.ntp.org',ci.internal_router()], enable_test_repo=TEST_REPO, deployment_id = self.deployment_id(ci), + public_netmask = ci.public_net_mask(), + internal_netmask = ci.internal_net_mask(), ) if is_not_essex(): template.replace( @@ -309,6 +313,8 @@ class Manifest(object): default_gateway=ci.public_router(), enable_test_repo=TEST_REPO, deployment_id = self.deployment_id(ci), + public_netmask = ci.public_net_mask(), + internal_netmask = ci.internal_net_mask(), ) if swift: template.replace(swift_loopback=self.loopback(loopback))