summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/deploy/deploy.sh2
-rwxr-xr-xcode/install_interface_patch.sh2
-rw-r--r--deploy/tempest.py30
3 files changed, 32 insertions, 2 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh
index 596e4aa8..e2923a1d 100755
--- a/ci/deploy/deploy.sh
+++ b/ci/deploy/deploy.sh
@@ -331,7 +331,7 @@ else
fi
echo "====== prepare host and pxe ======"
-ssh $SSH_PARAS $DAISY_IP "python ${REMOTE_SPACE}/deploy/tempest.py --dha $DHA --network $NETWORK --host 'yes' --isbare $IS_BARE"
+ssh $SSH_PARAS $DAISY_IP "python ${REMOTE_SPACE}/deploy/tempest.py --dha $DHA --network $NETWORK --host 'yes' --isbare $IS_BARE --scenario $DEPLOY_SCENARIO"
if [ $IS_BARE == 0 ];then
echo "====== daisy virtual-deploy operating system and openstack ======"
diff --git a/code/install_interface_patch.sh b/code/install_interface_patch.sh
index 312b82c7..68a1e789 100755
--- a/code/install_interface_patch.sh
+++ b/code/install_interface_patch.sh
@@ -9,7 +9,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
imagebranch="ocata"
-imageversion="170420124331"
+imageversion="170621131826"
imageserver="http://120.24.17.215"
imagedir="/var/lib/daisy/versionfile/kolla"
imagename="kolla-image-$imagebranch-$imageversion.tgz"
diff --git a/deploy/tempest.py b/deploy/tempest.py
index 4f75ee77..b1e02763 100644
--- a/deploy/tempest.py
+++ b/deploy/tempest.py
@@ -35,6 +35,8 @@ _CLI_OPTS = [
help='install daisy'),
cfg.IntOpt('isbare',
help='deploy environment'),
+ cfg.StrOpt('scenario',
+ help='deploy scenario'),
]
@@ -100,6 +102,10 @@ def prepare_install():
protocol_type = None
enable_cinder_backend(cluster_id, service_name,
ceph_disk_name, protocol_type)
+ if 'scenario' in conf and 'odl_l3' in conf['scenario']:
+ enable_opendaylight(cluster_id, 'odl_l3')
+ elif 'scenario' in conf and 'odl_l2' in conf['scenario']:
+ enable_opendaylight(cluster_id, 'odl_l2')
if 'isbare' in conf and conf['isbare'] == 0:
install_os_for_vm_step1(cluster_id)
else:
@@ -240,5 +246,29 @@ def enable_cinder_backend(cluster_id, service_name, disk_name, protocol_type):
print e
+def enable_opendaylight(cluster_id, layer):
+ role_meta = {'filters': {'cluster_id': cluster_id}}
+ role_list_generator = client.roles.list(**role_meta)
+ lb_role_id = [role.id for role in role_list_generator if
+ role.name == "CONTROLLER_LB"][0]
+ odl_layer = 'l3'
+ if 'odl_l3' == layer:
+ odl_layer = 'l3'
+ elif 'odl_l2' == layer:
+ odl_layer = 'l2'
+ neutron_backend_info = {
+ 'neutron_backends_array': [{'zenic_ip': '',
+ 'sdn_controller_type': 'opendaylight',
+ 'zenic_port': '',
+ 'zenic_user_password': '',
+ 'neutron_agent_type': '',
+ 'zenic_user_name': '',
+ 'enable_l2_or_l3': odl_layer}]}
+ try:
+ client.roles.update(lb_role_id, **neutron_backend_info)
+ except Exception as e:
+ print e
+
+
if __name__ == "__main__":
prepare_install()
/ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright 2014 CERN.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

import uuid

import six
from testtools import matchers

from keystone.common import controller
from keystone import exception
from keystone.tests import unit as tests


class V3ControllerTestCase(tests.TestCase):
    """Tests for the V3Controller class."""
    def setUp(self):
        super(V3ControllerTestCase, self).setUp()

        class ControllerUnderTest(controller.V3Controller):
            _mutable_parameters = frozenset(['hello', 'world'])

        self.api = ControllerUnderTest()

    def test_check_immutable_params(self):
        """Pass valid parameters to the method and expect no failure."""
        ref = {
            'hello': uuid.uuid4().hex,
            'world': uuid.uuid4().hex
        }
        self.api.check_immutable_params(ref)

    def test_check_immutable_params_fail(self):
        """Pass invalid parameter to the method and expect failure."""
        ref = {uuid.uuid4().hex: uuid.uuid4().hex for _ in range(3)}

        ex = self.assertRaises(exception.ImmutableAttributeError,
                               self.api.check_immutable_params, ref)
        ex_msg = six.text_type(ex)
        self.assertThat(ex_msg, matchers.Contains(self.api.__class__.__name__))
        for key in ref.keys():
            self.assertThat(ex_msg, matchers.Contains(key))