diff options
-rw-r--r-- | build/Makefile | 18 | ||||
-rw-r--r-- | build/mvn_settings.xml | 106 | ||||
-rw-r--r-- | build/opnfv-environment.yaml | 1 | ||||
-rwxr-xr-x | build/overcloud-opendaylight.sh | 12 | ||||
-rw-r--r-- | build/variables.sh | 2 | ||||
-rw-r--r-- | tests/test_apex_ip_utils.py | 39 |
6 files changed, 162 insertions, 16 deletions
diff --git a/build/Makefile b/build/Makefile index cefe4748..85f7f8df 100644 --- a/build/Makefile +++ b/build/Makefile @@ -156,27 +156,43 @@ openstack-congress-2016.1-1.noarch.rpm: ############### VPP_DIR = vpp +MAVEN = apache-maven-3.3.9 +MAVEN_FILE = $(MAVEN)-bin.tar.gz .PHONY: vpp-clean vpp-clean: @rm -f vpp-bin.tar.gz @rm -rf vpp-bin vpp + @rm -rf honeycomb $(MAVEN) $(MAVEN_FILE) honeycomb-1.0.0-99.noarch.rpm .PHONY: vpp-build vpp-build: vpp-bin.tar.gz -vpp-bin.tar.gz: vpp +vpp-bin.tar.gz: vpp honeycomb $(MAVEN) $(MAKE) -C $(VPP_DIR) UNATTENDED=yes install-dep bootstrap build pkg-rpm $(MAKE) -C $(VPP_DIR)/build-root PLATFORM=vpp TAG=vpp_debug vpp-api-install pushd vpp/vpp-api/python && python setup.py bdist + pushd honeycomb && ../$(MAVEN)/bin/mvn clean install -DskipTests + pushd honeycomb/packaging/rpm/ && BUILD_NUMBER=99 ./rpmbuild.sh mkdir vpp-bin mv vpp/build-root/*.rpm vpp-bin/ + mv honeycomb/packaging/rpm/RPMS/noarch/*.rpm . mv vpp/vpp-api/python/dist/*.tar.gz vpp-bin/ tar czf vpp-bin.tar.gz vpp-bin vpp: git clone https://gerrit.fd.io/r/vpp +honeycomb: + git clone https://gerrit.fd.io/r/p/honeycomb.git + +$(MAVEN): $(MAVEN_FILE) + tar zxvf apache-maven-3.3.9-bin.tar.gz + cp mvn_settings.xml $(MAVEN)/conf/settings.xml + +$(MAVEN_FILE): + wget http://www.webhostingjams.com/mirror/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz + ############### # UNDERCLOUD # diff --git a/build/mvn_settings.xml b/build/mvn_settings.xml new file mode 100644 index 00000000..c774461c --- /dev/null +++ b/build/mvn_settings.xml @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- vi: set et smarttab sw=2 tabstop=2: --> +<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> + + <profiles> + <profile> + <id>fd.io-release</id> + <repositories> + <repository> + <id>fd.io-mirror</id> + <name>fd.io-mirror</name> + <url>https://nexus.fd.io/content/groups/public/</url> + <releases> + <enabled>true</enabled> + <updatePolicy>never</updatePolicy> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>fd.io-mirror</id> + <name>fd.io-mirror</name> + <url>https://nexus.fd.io/content/repositories/public/</url> + <releases> + <enabled>true</enabled> + <updatePolicy>never</updatePolicy> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + + <profile> + <id>fd.io-snapshots</id> + <repositories> + <repository> + <id>fd.io-snapshot</id> + <name>fd.io-snapshot</name> + <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>fd.io-snapshot</id> + <name>fd.io-snapshot</name> + <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + <profile> + <id>opendaylight-snapshots</id> + <repositories> + <repository> + <id>opendaylight-snapshot</id> + <name>opendaylight-snapshot</name> + <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>opendaylight-shapshot</id> + <name>opendaylight-snapshot</name> + <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> + + <activeProfiles> + <activeProfile>fd.io-release</activeProfile> + <activeProfile>fd.io-snapshots</activeProfile> + <activeProfile>opendaylight-snapshots</activeProfile> + </activeProfiles> +</settings> + diff --git a/build/opnfv-environment.yaml b/build/opnfv-environment.yaml index 11132948..e25fbc25 100644 --- a/build/opnfv-environment.yaml +++ b/build/opnfv-environment.yaml @@ -8,6 +8,7 @@ parameters: ControllerEnableSwiftStorage: false NeutronEnableForceMetadata: true NeutronEnableDHCPMetadata: true + NeutronEnableIsolatedMetadata: true # CloudDomain: EnableSahara: false EnableTacker: true diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh index 9b63ebc5..65f9c06e 100755 --- a/build/overcloud-opendaylight.sh +++ b/build/overcloud-opendaylight.sh @@ -46,18 +46,11 @@ EOF # SDNVPN - Copy tunnel setup script wget https://raw.githubusercontent.com/openstack/fuel-plugin-opendaylight/brahmaputra-sr2/deployment_scripts/puppet/modules/opendaylight/templates/setup_TEPs.py -# tar up the honeycomb module -rm -rf puppet-honeycomb -git clone https://github.com/trozet/puppet-honeycomb -pushd puppet-honeycomb > /dev/null -git archive --format=tar.gz --prefix=honeycomb/ HEAD > ../puppet-honeycomb.tar.gz -popd > /dev/null # install ODL packages # install Jolokia for ODL HA # Patch in OPNFV custom puppet-tripleO # install Honeycomb -# install Honeycomb puppet module LIBGUESTFS_BACKEND=direct virt-customize \ --upload networking-odl.tar.gz:/root/ \ --upload /tmp/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \ @@ -67,9 +60,8 @@ LIBGUESTFS_BACKEND=direct virt-customize \ --install https://github.com/michaeltchapman/networking_rpm/raw/master/openstack-neutron-bgpvpn-2015.2-1.el7.centos.noarch.rpm \ --run-command "wget https://github.com/rhuss/jolokia/releases/download/v1.3.3/jolokia-1.3.3-bin.tar.gz -O /tmp/jolokia-1.3.3-bin.tar.gz" \ --run-command "tar -xvf /tmp/jolokia-1.3.3-bin.tar.gz -C /opt/opendaylight/system/org" \ - --run-command "yum -y install https://github.com/marosmars/files/raw/master/honeycomb-1.0.0-99.noarch.rpm" \ - --upload puppet-honeycomb.tar.gz:/etc/puppet/modules \ - --run-command "cd /etc/puppet/modules && tar xzf puppet-honeycomb.tar.gz" \ + --upload ../honeycomb-1.0.0-99.noarch.rpm:/root/ \ + --run-command "yum -y install /root/honeycomb-1.0.0-99.noarch.rpm" \ --upload ./setup_TEPs.py:/tmp \ -a overcloud-full-opendaylight_build.qcow2 diff --git a/build/variables.sh b/build/variables.sh index 1cca352d..ef4cd19c 100644 --- a/build/variables.sh +++ b/build/variables.sh @@ -8,7 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -rdo_images_uri=https://ci.centos.org/artifacts/rdo/images/mitaka/delorean/stable/ +rdo_images_uri=http://artifacts.opnfv.org/apex/colorado onos_release_uri=https://downloads.onosproject.org/nightly/ onos_release_file=onos-1.6.0-rc2.tar.gz onos_jdk_uri=https://www.dropbox.com/s/qyujpib8zyhzeev diff --git a/tests/test_apex_ip_utils.py b/tests/test_apex_ip_utils.py index 60c8b2b8..e5e84b63 100644 --- a/tests/test_apex_ip_utils.py +++ b/tests/test_apex_ip_utils.py @@ -8,13 +8,17 @@ ############################################################################## import re +import ipaddress from apex.ip_utils import IPUtilsException from apex.ip_utils import get_interface from apex.ip_utils import find_gateway from apex.ip_utils import get_ip from apex.ip_utils import get_ip_range +from apex.ip_utils import _validate_ip_range +from nose.tools import assert_true +from nose.tools import assert_false from nose.tools import assert_equal from nose.tools import assert_raises from nose.tools import assert_is_instance @@ -63,9 +67,10 @@ class TestIpUtils(object): assert_is_instance(get_interface(self.iface_name, address_family=4), IPv4Address) -# assert_is_instance(get_interface( -# self.iface_name, -# address_family=6), IPv6Address) + # can't enable this until there's a v6 address on the ci hosts + # assert_is_instance(get_interface( + # self.iface_name, + # address_family=6), IPv6Address) assert_raises(IPUtilsException, get_interface, self.iface_name, 0) @@ -75,7 +80,9 @@ class TestIpUtils(object): assert_equal(find_gateway(iface_virbr0), None) def test_get_ip(self): - assert_equal(get_ip(1, cidr="10.10.10.0/24"), "0") + cidr = ipaddress.ip_network("10.10.10.0/24") + assert_equal(get_ip(1, cidr=cidr), "10.10.10.1") + assert_raises(IPUtilsException, get_ip, 1000, interface=self.iface) assert_regexp_matches(get_ip(1, interface=self.iface), ip4_pattern) assert_raises(IPUtilsException, get_ip, 1) @@ -102,3 +109,27 @@ class TestIpUtils(object): count=10), ip4_pattern) assert_regexp_matches(get_ip_range(cidr=cidr, end_offset=20, count=10), ip4_pattern) + + def test__validate_ip_range(self): + cidr = ip_network('10.10.10.0/24') + assert_true(_validate_ip_range( + start_ip=ipaddress.IPv4Address('10.10.10.1'), + end_ip=ipaddress.IPv4Address('10.10.10.10'), + cidr=cidr)) + assert_false(_validate_ip_range( + start_ip=ipaddress.IPv4Address('10.10.10.10'), + end_ip=ipaddress.IPv4Address('10.10.10.1'), + cidr=cidr)) + assert_false(_validate_ip_range( + start_ip=ipaddress.IPv4Address('10.10.0.1'), + end_ip=ipaddress.IPv4Address('10.10.10.10'), + cidr=cidr)) + assert_false(_validate_ip_range( + start_ip=ipaddress.IPv4Address('10.10.10.1'), + end_ip=ipaddress.IPv4Address('10.10.11.10'), + cidr=cidr)) + + def test_exception(self): + e = IPUtilsException("test") + print(e) + assert_is_instance(e, IPUtilsException) |