diff options
-rwxr-xr-x | ci/kolla-build-vm.sh | 2 | ||||
-rwxr-xr-x | ci/kolla-build.sh | 1 | ||||
-rw-r--r-- | deploy/post/execute.py | 16 | ||||
-rw-r--r-- | docs/conf.py | 1 | ||||
-rw-r--r-- | docs/conf.yaml | 3 | ||||
-rw-r--r-- | docs/index.rst | 20 | ||||
-rw-r--r-- | docs/release/installation/index.rst | 2 | ||||
-rw-r--r-- | docs/requirements.txt | 2 | ||||
-rw-r--r-- | tests/data/openrc_conf/globals_odl.yml | 2 | ||||
-rw-r--r-- | tests/unit/post/test_post_execute.py | 9 | ||||
-rwxr-xr-x | tools/centos-img-modify.sh | 3 | ||||
-rwxr-xr-x | tools/daisy-img-modify.sh | 11 | ||||
-rw-r--r-- | tox.ini | 10 |
13 files changed, 71 insertions, 11 deletions
diff --git a/ci/kolla-build-vm.sh b/ci/kolla-build-vm.sh index 30113cfe..5609cd3c 100755 --- a/ci/kolla-build-vm.sh +++ b/ci/kolla-build-vm.sh @@ -186,6 +186,8 @@ function pre_check { yum install -y python2-pip pip install tox + # SELinux is not supported with the overlay2 graph driver on this kernel. + sed -i 's/--selinux-enabled /--selinux-enabled=false /g' /etc/sysconfig/docker || true # Just make sure docker is working. /usr/bin/systemctl restart docker } diff --git a/ci/kolla-build.sh b/ci/kolla-build.sh index cca98db5..fe7a6679 100755 --- a/ci/kolla-build.sh +++ b/ci/kolla-build.sh @@ -108,6 +108,7 @@ function create_daisy_vm_and_networks() { echo "====== Create Daisy VM ======" $CREATE_QCOW2_PATH/daisy-img-modify.sh -c $CREATE_QCOW2_PATH/centos-img-modify.sh -w $IMWORKDIR -a $DAISY_IP $PARAS_IMAGE + sed -i -e "/source * file/{s|source.*$|source file=\'$IMWORKDIR\/centos7.qcow2\'\/>|;}" $VMDEPLOY_DAISY_SERVER_VM virsh net-define $VMDELOY_DAISY_SERVER_NET virsh net-start daisy1 diff --git a/deploy/post/execute.py b/deploy/post/execute.py index 6acbe637..7b0293a2 100644 --- a/deploy/post/execute.py +++ b/deploy/post/execute.py @@ -21,10 +21,20 @@ def _config_kolla_admin_openrc(kolla_config_path): with open('%s/globals.yml' % kolla_config_path, 'r') as f: kolla_config = yaml.safe_load(f.read()) if kolla_config.get('enable_opendaylight', None) == 'yes': - sdn_controller_ip = kolla_config.get('kolla_internal_vip_address') openrc_file = file('%s/admin-openrc.sh' % kolla_config_path, 'a') - sdn_ctl_ip = 'export SDN_CONTROLLER_IP=' + sdn_controller_ip + '\n' - openrc_file.write(sdn_ctl_ip) + + v = kolla_config.get('kolla_internal_vip_address') + line = 'export SDN_CONTROLLER_IP=' + v + '\n' + openrc_file.write(line) + + v = kolla_config.get('opendaylight_haproxy_restconf_port_backup') + line = 'export SDN_CONTROLLER_WEBPORT=' + v + '\n' + openrc_file.write(line) + + v = kolla_config.get('opendaylight_haproxy_restconf_port') + line = 'export SDN_CONTROLLER_RESTCONFPORT=' + v + '\n' + openrc_file.write(line) + openrc_file.close() diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..eb12e74b --- /dev/null +++ b/docs/conf.py @@ -0,0 +1 @@ +from docs_conf.conf import * # noqa: F401,F403 diff --git a/docs/conf.yaml b/docs/conf.yaml new file mode 100644 index 00000000..bb1beaa1 --- /dev/null +++ b/docs/conf.yaml @@ -0,0 +1,3 @@ +--- +project_cfg: opnfv +project: daisy diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..e6ae4c9b --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 +.. International License. +.. SPDX-License-Identifier: CC-BY-4.0 +.. (c) Open Platform for NFV Project, Inc. and its contributors + +.. _daisy: + +========= +Daisy4NFV +========= + +.. toctree:: + :maxdepth: 2 + + release/installation/index + release/configguide/index + release/release-notes/index + development/design/index + development/requirement/multicast + test diff --git a/docs/release/installation/index.rst b/docs/release/installation/index.rst index 611ecf63..3080e14b 100644 --- a/docs/release/installation/index.rst +++ b/docs/release/installation/index.rst @@ -8,7 +8,7 @@ OPNFV Daisy4nfv Installation Guide ********************************** .. toctree:: - :numbered: + :numbered: :maxdepth: 4 introduction.rst diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..9fde2df2 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +lfdocs-conf +sphinx_opnfv_theme diff --git a/tests/data/openrc_conf/globals_odl.yml b/tests/data/openrc_conf/globals_odl.yml index 588dd927..2598ccbb 100644 --- a/tests/data/openrc_conf/globals_odl.yml +++ b/tests/data/openrc_conf/globals_odl.yml @@ -11,3 +11,5 @@ neutron_external_interface: ens8 openstack_release: 4.0.2 storage_interface: ens3 tunnel_interface: ens3 +opendaylight_haproxy_restconf_port: '8087' +opendaylight_haproxy_restconf_port_backup: '8181' diff --git a/tests/unit/post/test_post_execute.py b/tests/unit/post/test_post_execute.py index 55e345a2..0ca00941 100644 --- a/tests/unit/post/test_post_execute.py +++ b/tests/unit/post/test_post_execute.py @@ -169,9 +169,12 @@ def test__config_kolla_admin_openrc(globals_file_name, openrc_conf_file_dir, tmp elif globals_file_name == 'globals_odl.yml': diff = DeepDiff(src_openrc_lines, dst_openrc_lines, ignore_order=True) assert len(diff) == 1 and diff.get('iterable_item_added') is not None - assert len(diff['iterable_item_added']) == 1 - for val in diff['iterable_item_added'].values(): - assert 'export SDN_CONTROLLER_IP' in val + assert len(diff['iterable_item_added']) == 3 + diffvals = ','.join(diff['iterable_item_added'].values()) + assert 'export SDN_CONTROLLER_IP' in diffvals + assert 'export SDN_CONTROLLER_WEBPORT=' in diffvals + assert 'export SDN_CONTROLLER_RESTCONFPORT=' in diffvals + tmpdir.remove() diff --git a/tools/centos-img-modify.sh b/tools/centos-img-modify.sh index 5a2df82f..41c730cb 100755 --- a/tools/centos-img-modify.sh +++ b/tools/centos-img-modify.sh @@ -74,3 +74,6 @@ cd /etc if [ ! -z $localtime_file ] && [ -f $localtime_file ]; then ln -s -f $localtime_file /etc/localtime fi + +# https://review.openstack.org/#/c/568180/ +test -e /etc/yum/vars/contentdir || echo centos > /etc/yum/vars/contentdir diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh index 8b3a21f3..6d2ff53f 100755 --- a/tools/daisy-img-modify.sh +++ b/tools/daisy-img-modify.sh @@ -99,7 +99,10 @@ raw_imgfile="${workdir}/centos7.raw" # download and checksum base image, conditionally if local copy is outdated download() { - test -d $workdir || mkdir -p $workdir + test -d $workdir || { + mkdir -p $workdir + test -z $SUDO_USER || chown -R $SUDO_USER:$SUDO_USER $workdir + } cd $workdir rm -f sha256sum.txt wget $sha256sum_url @@ -162,8 +165,8 @@ resize() { kpartx -av $raw_imgfile sleep 2 dmsetup ls - fdisk -l /dev/${loopdevice:0:5} || true - growpart /dev/${loopdevice:0:5} 1 + fdisk -l /dev/${loopdevice:0:-2} || true + growpart /dev/${loopdevice:0:-2} 1 dmsetup clear $loopdevice kpartx -dv $raw_imgfile || eliminate } @@ -176,7 +179,7 @@ setup() { kpartx -av $raw_imgfile sleep 2 dmsetup ls - fdisk -l /dev/${loopdevice:0:5} || true + fdisk -l /dev/${loopdevice:0:-2} || true if [ "xfs" = "$(blkid -o value -s TYPE /dev/mapper/$loopdevice)" ]; then mountopts="-o nouuid" @@ -25,9 +25,19 @@ setenv= PYTHONPATH = {toxinidir} [testenv:pep8] +usedevelop = False deps = flake8 commands = flake8 {toxinidir} +[testenv:docs] +usedevelop = False +deps = -rdocs/requirements.txt +commands = + sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html + +[testenv:docs-linkcheck] +commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck + [flake8] # H803 skipped on purpose per list discussion. # E123, E125 skipped as they are invalid PEP-8. |