d649785c9e
The following changes have been made to coordinate with the changes made in Neutron for Pike: * Partial use of Neutron context has been completely moved to neutron_lib's context. * The patching of neutron.db.api.get_session() has been replaced with patching of sqlalchemy.orm.session to add the notification_queue attribute. This significantly reduces the earlier complexity of patching. * Use of top-level start of transaction in GBP plugins: with context.session.begin(subtransactions=True): has been migrated to use of: with db_api.context_manager.writer.using(context): or with db_api.context_manager.reader.using(context) as relevant. * Calls to _make_resource_xxx_dict() in GBP plugins have been moved to inside the transaction. * The use of: neutron.callbacks.events neutron.callbacks.exceptions neutron.callbacks.registry to neutron_lib.callbacks.events neutron_lib.callbacks.exceptions neutron_lib.callbacks.registry * The use of: neutron.api.v2.attributes.resource_xxx neutron.extensions.extension_xxx to: from neutron_lib.api.definitions.resource_xxx from neutron_lib.api.definitions.extension_xxx resp. * The use of: neutron.db.db_base_plugin_v2.NeutronDbPluginV2.register_dict_extend_funcs to: neutron.db._resource_extend.resource_extend (the latter is a decorator) * The use of: neutron.db.db_base_plugin_v2.NeutronDbPluginV2.register_model_query_hook() to: from neutron.db import _model_query as model_query.register_hook() * The use of: neutron.db.segments_db.NetworkSegment to: neutron.db.models.segment.NetworkSegment * In the case of Neutron ml2plus plugin (used by APIC/AIM solution), the use of get_admin_context() has been patched to return elevated version of the current context in use. This helps to preserve the session and transaction semantics. Ideally, context.elevated() would have been directly used in all these places, however the current context is not available in these places, and hence getting the current context and elevating it is wrapped in the get_admin_context() patched method. * In the case of the components used by the APIC/AIM solution (including the ml2plus and l3_plugin) the use of: with context.session.begin(subtransactions=True): to with db_api.context_manager.writer.using(context): or with db_api.context_manager.reader.using(context): as relevant. * Patching of methods from Neutron which is no longer relevant have been removed from gbpservice.neutron.extensions.patch module. * Setting up of UTs has been fixed to load and reset configurations appropriately. This helps to eleminate some failures when tests are run in non-deterministic orders. * In tree devstack plugin has been updated (aim repo commit pin needs to be reverted). * Gate jobs have been updated as relevant (including fixes to the exercise scripts and job configurations). The associated repos, namely, client, UI and automation have also been updated (the reference to the client's gerrit patch needs to be updated once the patch has been merged). Change-Id: I11dd089effbf40cf104afd720dc40a9911dcf28d
91 lines
3.4 KiB
Plaintext
Executable File
91 lines
3.4 KiB
Plaintext
Executable File
# Make sure the plugin name in local.conf is "group-based-policy", as in: enable_plugin group-based-policy <remote> <branch>
|
|
source $DEST/group-based-policy/devstack/lib/group-based-policy
|
|
|
|
ENABLE_GBP_GATE=${ENABLE_GBP_GATE:-False}
|
|
ENABLE_APIC_AIM=${ENABLE_APIC_AIM:-False}
|
|
ENABLE_APIC_AIM_GATE=${ENABLE_APIC_AIM_GATE:-False}
|
|
[[ $ENABLE_APIC_AIM = True ]] && source $DEST/group-based-policy/devstack/lib/apic_aim
|
|
[[ $ENABLE_APIC_AIM_GATE = True ]] && source $DEST/group-based-policy/devstack/lib/apic_aim
|
|
[[ $ENABLE_NSX_POLICY = True ]] && source $DEST/group-based-policy/devstack/lib/nsx
|
|
|
|
ENABLE_NFP=${ENABLE_NFP:-False}
|
|
[[ $ENABLE_NFP = True ]] && NFP_DEVSTACK_MODE=${NFP_DEVSTACK_MODE:-base}
|
|
[[ $ENABLE_NFP = True ]] && source $DEST/group-based-policy/devstack/lib/nfp
|
|
# VM locations
|
|
ConfiguratorQcow2Image=${ConfiguratorQcow2Image:-build}
|
|
|
|
# Enable necessary Neutron plugins, including group_policy and ncp (L3
|
|
# is set via ML2_L3_PLUGIN, so isn't listed here).
|
|
_neutron_service_plugin_class_add "group_policy,ncp"
|
|
|
|
# Preferred git mirror
|
|
GIT_BASE=${GIT_BASE:-https://git.openstack.org}
|
|
|
|
# Git repositories needed to deploy GBP:
|
|
GBPSERVICE_REPO=${GBPSERVICE_REPO:-${GIT_BASE}/openstack/group-based-policy.git}
|
|
GBPSERVICE_BRANCH=${GBPSERVICE_BRANCH:-master}
|
|
GBPCLIENT_REPO=${GBPCLIENT_REPO:-${GIT_BASE}/openstack/python-group-based-policy-client.git}
|
|
GBPCLIENT_BRANCH=${GBPCLIENT_BRANCH:-master}
|
|
GBPUI_REPO=${GBPUI_REPO:-${GIT_BASE}/openstack/group-based-policy-ui.git}
|
|
GBPUI_BRANCH=${GBPUI_BRANCH:-master}
|
|
GBPHEAT_REPO=${GBPHEAT_REPO:-${GIT_BASE}/openstack/group-based-policy-automation.git}
|
|
GBPHEAT_BRANCH=${GBPHEAT_BRANCH:-master}
|
|
AIM_BRANCH=${AIM_BRANCH:-master}
|
|
OPFLEX_BRANCH=${OPFLEX_BRANCH:-master}
|
|
APICAPI_BRANCH=${APICAPI_BRANCH:-master}
|
|
|
|
# Enable necessary services, including group-policy (and disable others)
|
|
disable_service n-net
|
|
enable_service q-svc
|
|
if [[ $ENABLE_APIC_AIM = True || $ENABLE_APIC_AIM_GATE = True ]]; then
|
|
disable_service q-agt
|
|
disable_service q-l3
|
|
else
|
|
enable_service q-agt
|
|
enable_service q-l3
|
|
fi
|
|
if [[ $ENABLE_APIC_AIM_GATE = True ]]; then
|
|
disable_service q-dhcp
|
|
disable_service q-lbaas
|
|
disable_service q-meta
|
|
else
|
|
enable_service q-dhcp
|
|
fi
|
|
enable_service q-fwaas-v1
|
|
enable_service q-lbaasv2
|
|
enable_service q-meta
|
|
enable_service neutron
|
|
enable_service group-policy
|
|
|
|
if [[ $ENABLE_NSX_POLICY = False ]]; then
|
|
if [[ $ENABLE_APIC_AIM_GATE = False ]]; then
|
|
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
|
|
disable_service tempest
|
|
else
|
|
# this may not be required
|
|
DISABLED_SERVICES+=,n-api,n-cpu,n-cond,n-sch,n-novnc,n-cauth,g-api,g-reg,c-sch,c-api,c-vol,horizon,heat,h-api,h-api-cfn,h-api-cw,h-eng,dstat,tempest
|
|
fi
|
|
fi
|
|
if [[ $ENABLE_NFP = True ]]; then
|
|
# NFP services
|
|
enable_service nfp_orchestrator
|
|
enable_service nfp_proxy
|
|
enable_service nfp_proxy_agent
|
|
[[ $NFP_DEVSTACK_MODE = base ]] && enable_service nfp_base_configurator
|
|
[[ $NFP_DEVSTACK_MODE != base ]] && enable_service nfp_config_orchestrator
|
|
fi
|
|
if [[ $ENABLE_NSX_POLICY = True ]]; then
|
|
disable_service q-meta
|
|
disable_service q-dhcp
|
|
disable_service q-l3
|
|
disable_service q-agt
|
|
fi
|
|
|
|
OVS_PHYSICAL_BRIDGE=br-ex
|
|
|
|
# Deployment preferences
|
|
SYSLOG=${SYSLOG:-True}
|
|
|
|
# Skip exercises by default (can be overridden in local.conf)
|
|
SKIP_EXERCISES=${SKIP_EXERCISES:-volumes,trove,swift,sahara,euca,bundle,boot_from_volume,aggregates,zaqar,client-env,neutron-adv-test,floating_ips,client-args,horizon,sec_groups,gbp_servicechain,gbp_heat}
|