segmentation_id=rally_segmentation_id,
subnet_settings=[SubnetConfig(
name=subnet_name,
- cidr=self.RALLY_PRIVATE_SUBNET_CIDR)]))
+ cidr=self.RALLY_PRIVATE_SUBNET_CIDR,
+ dns_nameservers=[env.get('NAMESERVER')])]))
if network_creator is None:
raise Exception("Failed to create private network")
self.priv_net_id = network_creator.get_network().id
'tempest_private_subnet_name') + self.guid,
project_name=project_name,
cidr=getattr(
- config.CONF, 'tempest_private_subnet_cidr'))]))
+ config.CONF, 'tempest_private_subnet_cidr'),
+ dns_nameservers=[env.get('NAMESERVER')])]))
if network_creator is None or network_creator.get_network() is None:
raise Exception("Failed to create private network")
self.creators.append(network_creator)
segmentation_id=vping_segmentation_id,
subnet_settings=[SubnetConfig(
name=private_subnet_name,
- cidr=private_subnet_cidr)]))
+ cidr=private_subnet_cidr,
+ dns_nameservers=[env.get('NAMESERVER')])]))
self.creators.append(self.network_creator)
# Creating router to external network
from functest.opnfv_tests.openstack.snaps import snaps_utils
import functest.opnfv_tests.vnf.ims.clearwater_ims_base as clearwater_ims_base
from functest.utils import config
+from functest.utils import env
__author__ = "Valentin Boucher <valentin.boucher@orange.com>"
self.__logger.info("Creating full network ...")
subnet_settings = SubnetConfig(
name='cloudify_ims_subnet-{}'.format(self.uuid),
- cidr='10.67.79.0/24')
+ cidr='10.67.79.0/24',
+ dns_nameservers=[env.get('NAMESERVER')])
network_settings = NetworkConfig(
name='cloudify_ims_network-{}'.format(self.uuid),
subnet_settings=[subnet_settings])
from functest.opnfv_tests.vnf.ims.ixia.utils import IxLoadUtils
from functest.opnfv_tests.vnf.ims.ixia.utils import IxRestUtils
from functest.utils import config
+from functest.utils import env
__author__ = "Valentin Boucher <valentin.boucher@orange.com>"
self.__logger.info("Creating full IXIA network ...")
subnet_settings = SubnetConfig(name='ixia_management_subnet',
- cidr='10.10.10.0/24')
+ cidr='10.10.10.0/24',
+ dns_nameservers=[env.get('NAMESERVER')])
network_settings = NetworkConfig(name='ixia_management_network',
subnet_settings=[subnet_settings])
network_creator = OpenStackNetwork(self.snaps_creds, network_settings)
from functest.core import vnf
from functest.opnfv_tests.openstack.snaps import snaps_utils
from functest.utils import config
+from functest.utils import env
from org.openbaton.cli.errors.errors import NfvoException
from org.openbaton.cli.agents.agents import MainAgent
"Creating network/subnet/router if they doen't exist yet...")
subnet_settings = SubnetConfig(
name='{}_subnet-{}'.format(self.case_name, self.uuid),
- cidr="192.168.100.0/24")
+ cidr="192.168.100.0/24",
+ dns_nameservers=[env.get('NAMESERVER')])
network_settings = NetworkConfig(
name='{}_net-{}'.format(self.case_name, self.uuid),
subnet_settings=[subnet_settings])
from functest.core import vnf
from functest.utils import config
+from functest.utils import env
from org.openbaton.cli.errors.errors import NfvoException
from org.openbaton.cli.agents.agents import MainAgent
"Creating network/subnet/router if they doen't exist yet...")
subnet_settings = SubnetConfig(
name='{}_subnet-{}'.format(self.case_name, self.uuid),
- cidr="192.168.100.0/24")
+ cidr="192.168.100.0/24",
+ dns_nameservers=[env.get('NAMESERVER')])
network_settings = NetworkConfig(
name='{}_net-{}'.format(self.case_name, self.uuid),
subnet_settings=[subnet_settings])
import functest.opnfv_tests.vnf.router.vrouter_base as vrouter_base
from functest.opnfv_tests.vnf.router.utilvnf import Utilvnf
from functest.utils import config
+from functest.utils import env
from functest.utils import functest_utils
from git import Repo
self.__logger.info("Creating full network ...")
subnet_settings = SubnetConfig(
name='cloudify_vrouter_subnet-{}'.format(self.uuid),
- cidr='10.67.79.0/24')
+ cidr='10.67.79.0/24',
+ dns_nameservers=[env.get('NAMESERVER')])
network_settings = NetworkConfig(
name='cloudify_vrouter_network-{}'.format(self.uuid),
subnet_settings=[subnet_settings])
from xtesting.core import testcase
from functest.opnfv_tests.openstack.vping import vping_userdata, vping_ssh
+from functest.utils import env
class VPingUserdataTesting(unittest.TestCase):
scp_client = mock.MagicMock(name='put')
scp_client.put.return_value = None
+ subnet_config = SubnetConfig(
+ name='bar',
+ cidr='10.0.0.1/24',
+ dns_nameservers=[env.get('NAMESERVER')])
+
with mock.patch('snaps.openstack.utils.deploy_utils.create_image',
return_value=OpenStackImage(self.os_creds, None)), \
mock.patch('snaps.openstack.utils.deploy_utils.create_network',
self.os_creds,
NetworkConfig(
name='foo',
- subnet_settings=[
- SubnetConfig(
- name='bar',
- cidr='10.0.0.1/24')]))), \
+ subnet_settings=[subnet_config]))), \
mock.patch('snaps.openstack.utils.deploy_utils.'
'create_vm_instance',
return_value=OpenStackVmInstance(
'ENERGY_RECORDER_API_URL': env.INPUTS['ENERGY_RECORDER_API_URL'],
'ENERGY_RECORDER_API_USER': env.INPUTS['ENERGY_RECORDER_API_USER'],
'ENERGY_RECORDER_API_PASSWORD': env.INPUTS['ENERGY_RECORDER_API_PASSWORD'],
- 'VOLUME_DEVICE_NAME': 'vdb'
+ 'VOLUME_DEVICE_NAME': 'vdb',
+ 'NAMESERVER': '8.8.8.8'
}