Renamed 'servicevm' 'advsvc' in tacker install file
Initially the service name was 'servicevm' and 'advsvc' in install file. Now it's been renamed to 'tacker' and 'nfv-role'. Change in install file (tacker/devstack/lib/tacker) was necessary to show the updated names in horizon/dashboard for tacker service. Change-Id: I740f3bfe04525d616c8f7df2847cee8a8d2b1cab Depends-on: I919d77276af72586a20f50239166325adbf9fb11 Depends-on: I097ccbfb7ae192410400b06bd8796e81e62ee65e Closes-Bug: #1524224
This commit is contained in:
parent
81a9262be3
commit
3132ca51be
51
devstack/lib/tacker
Executable file → Normal file
51
devstack/lib/tacker
Executable file → Normal file
@ -25,7 +25,7 @@
|
|||||||
# - stop_tacker
|
# - stop_tacker
|
||||||
# - cleanup_tacker
|
# - cleanup_tacker
|
||||||
|
|
||||||
# Tacker SeviceVM
|
# Tacker
|
||||||
# ---------------
|
# ---------------
|
||||||
|
|
||||||
# Save trace setting
|
# Save trace setting
|
||||||
@ -117,18 +117,13 @@ function create_tacker_cache_dir {
|
|||||||
# Migrated from keystone_data.sh
|
# Migrated from keystone_data.sh
|
||||||
function create_tacker_accounts {
|
function create_tacker_accounts {
|
||||||
if is_service_enabled tacker; then
|
if is_service_enabled tacker; then
|
||||||
# openstack user create tacker --password service-password
|
|
||||||
# openstack role add admin --user <uuid> --project service
|
|
||||||
create_service_user "tacker"
|
create_service_user "tacker"
|
||||||
get_or_create_role "advsvc"
|
get_or_create_role "advsvc"
|
||||||
create_service_user "tacker" "advsvc"
|
create_service_user "tacker" "advsvc"
|
||||||
|
|
||||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||||
|
|
||||||
# openstack service create servicevm --name tacker '--description=tacker Service'
|
|
||||||
local tacker_service=$(get_or_create_service "tacker" \
|
local tacker_service=$(get_or_create_service "tacker" \
|
||||||
"servicevm" "Tacker Service")
|
"nfv-orchestration" "Tacker NFV Orchestration Service")
|
||||||
# openstack endpoint create <uuid of service> --region RegionOne --publicurl 'http://143.183.96.146:8888/' --adminurl 'http://143.183.96.146:8888/' --internalurl 'http://143.183.96.146:8888/'
|
|
||||||
get_or_create_endpoint $tacker_service \
|
get_or_create_endpoint $tacker_service \
|
||||||
"$REGION_NAME" \
|
"$REGION_NAME" \
|
||||||
"$TACKER_PROTOCOL://$SERVICE_HOST:$TACKER_PORT/" \
|
"$TACKER_PROTOCOL://$SERVICE_HOST:$TACKER_PORT/" \
|
||||||
@ -143,8 +138,6 @@ function create_tacker_accounts {
|
|||||||
|
|
||||||
# init_tacker() - Initialize databases, etc.
|
# init_tacker() - Initialize databases, etc.
|
||||||
function init_tacker {
|
function init_tacker {
|
||||||
# mysql -uroot -pmysql-password -h143.183.96.146 -e 'DROP DATABASE IF EXISTS tacker;'
|
|
||||||
# mysql -uroot -pmysql-password -h143.183.96.146 -e 'CREATE DATABASE tacker CHARACTER SET utf8;'
|
|
||||||
recreate_database $TACKER_DB_NAME
|
recreate_database $TACKER_DB_NAME
|
||||||
|
|
||||||
# Run Tacker db migrations
|
# Run Tacker db migrations
|
||||||
@ -153,7 +146,6 @@ function init_tacker {
|
|||||||
|
|
||||||
# install_tacker() - Collect source and prepare
|
# install_tacker() - Collect source and prepare
|
||||||
function install_tacker {
|
function install_tacker {
|
||||||
#git_clone $TACKER_REPO $TACKER_DIR $TACKER_BRANCH
|
|
||||||
setup_develop $TACKER_DIR
|
setup_develop $TACKER_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,24 +180,9 @@ function start_tacker_api {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO
|
|
||||||
# Start running processes, including screen
|
|
||||||
function start_tacker_agents {
|
|
||||||
# TODO
|
|
||||||
return
|
|
||||||
|
|
||||||
# Start up the tacker agents if enabled
|
|
||||||
run_process q-agt "python $AGENT_BINARY --config-file $TACKER_CONF"
|
|
||||||
|
|
||||||
if is_service_enabled q-servicevm-agent; then
|
|
||||||
screen_it q-servicevm "cd $TACKER_DIR && python $AGENT_SERVICEVM_BINARY --config-file $TACKER_CONF --config-file $SERVICEVM_CONF_FILENAME"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# stop_tacker() - Stop running processes (non-screen)
|
# stop_tacker() - Stop running processes (non-screen)
|
||||||
function stop_tacker {
|
function stop_tacker {
|
||||||
stop_process tacker-svc
|
stop_process tacker
|
||||||
# stop_process q-agt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# cleanup_tacker() - Remove residual data files, anything left over from previous
|
# cleanup_tacker() - Remove residual data files, anything left over from previous
|
||||||
@ -284,18 +261,18 @@ function configure_tacker {
|
|||||||
iniset $TACKER_CONF DEFAULT nova_api_insecure $TACKER_NOVA_API_INSECURE
|
iniset $TACKER_CONF DEFAULT nova_api_insecure $TACKER_NOVA_API_INSECURE
|
||||||
iniset $TACKER_CONF DEFAULT nova_region_name $REGION_NAME
|
iniset $TACKER_CONF DEFAULT nova_region_name $REGION_NAME
|
||||||
|
|
||||||
iniset $TACKER_CONF servicevm_nova auth_plugin password
|
iniset $TACKER_CONF tacker_nova auth_plugin password
|
||||||
iniset $TACKER_CONF servicevm_nova auth_url $KEYSTONE_AUTH_URI
|
iniset $TACKER_CONF tacker_nova auth_url $KEYSTONE_AUTH_URI
|
||||||
iniset $TACKER_CONF servicevm_nova username nova
|
iniset $TACKER_CONF tacker_nova username nova
|
||||||
iniset $TACKER_CONF servicevm_nova password $SERVICE_PASSWORD
|
iniset $TACKER_CONF tacker_nova password $SERVICE_PASSWORD
|
||||||
iniset $TACKER_CONF servicevm_nova user_domain_id default
|
iniset $TACKER_CONF tacker_nova user_domain_id default
|
||||||
iniset $TACKER_CONF servicevm_nova project_name $SERVICE_TENANT_NAME
|
iniset $TACKER_CONF tacker_nova project_name $SERVICE_TENANT_NAME
|
||||||
iniset $TACKER_CONF servicevm_nova project_domain_id default
|
iniset $TACKER_CONF tacker_nova project_domain_id default
|
||||||
iniset $TACKER_CONF servicevm_nova region_name $REGION_NAME
|
iniset $TACKER_CONF tacker_nova region_name $REGION_NAME
|
||||||
|
|
||||||
iniset $TACKER_CONF servicevm_heat heat_uri http://$SERVICE_HOST:8004/v1
|
iniset $TACKER_CONF tacker_heat heat_uri http://$SERVICE_HOST:8004/v1
|
||||||
iniset $TACKER_CONF servicevm_heat stack_retries 60
|
iniset $TACKER_CONF tacker_heat stack_retries 60
|
||||||
iniset $TACKER_CONF servicevm_heat stack_retry_wait 5
|
iniset $TACKER_CONF tacker_heat stack_retry_wait 5
|
||||||
|
|
||||||
_tacker_setup_rootwrap
|
_tacker_setup_rootwrap
|
||||||
echo "Creating bridge"
|
echo "Creating bridge"
|
||||||
|
@ -30,7 +30,7 @@ driver path in setup.cfg file in root directory.
|
|||||||
For example:
|
For example:
|
||||||
::
|
::
|
||||||
|
|
||||||
tacker.servicevm.monitor_drivers =
|
tacker.tacker.monitor_drivers =
|
||||||
ping = tacker.vm.monitor_drivers.ping.ping:VNFMonitorPing
|
ping = tacker.vm.monitor_drivers.ping.ping:VNFMonitorPing
|
||||||
|
|
||||||
The methods that need to override in driver are:
|
The methods that need to override in driver are:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: tacker-server
|
# Short-Description: tacker-server
|
||||||
# Description: Provides the Tacker servicevm/device manager service
|
# Description: Provides the Tacker service
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
@ -385,7 +385,7 @@ auth_uri = http://127.0.0.1:5000
|
|||||||
# If set, use this value for pool_timeout with sqlalchemy
|
# If set, use this value for pool_timeout with sqlalchemy
|
||||||
# pool_timeout = 10
|
# pool_timeout = 10
|
||||||
|
|
||||||
[servicevm]
|
[tacker]
|
||||||
# Specify drivers for hosting device
|
# Specify drivers for hosting device
|
||||||
# exmpale: infra_driver = noop
|
# exmpale: infra_driver = noop
|
||||||
# exmpale: infra_driver = nova
|
# exmpale: infra_driver = nova
|
||||||
@ -400,7 +400,7 @@ mgmt_driver = openwrt
|
|||||||
monitor_driver = ping
|
monitor_driver = ping
|
||||||
monitor_driver = http_ping
|
monitor_driver = http_ping
|
||||||
|
|
||||||
[servicevm_nova]
|
[tacker_nova]
|
||||||
# parameters for novaclient to talk to nova
|
# parameters for novaclient to talk to nova
|
||||||
region_name = RegionOne
|
region_name = RegionOne
|
||||||
project_domain_id = default
|
project_domain_id = default
|
||||||
@ -411,7 +411,7 @@ username = nova
|
|||||||
auth_url = http://127.0.0.1:35357
|
auth_url = http://127.0.0.1:35357
|
||||||
auth_plugin = password
|
auth_plugin = password
|
||||||
|
|
||||||
[servicevm_heat]
|
[tacker_heat]
|
||||||
heat_uri = http://localhost:8004/v1
|
heat_uri = http://localhost:8004/v1
|
||||||
stack_retries = 60
|
stack_retries = 60
|
||||||
stack_retry_wait = 5
|
stack_retry_wait = 5
|
||||||
|
10
setup.cfg
10
setup.cfg
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = tacker
|
name = tacker
|
||||||
version = 2014.2
|
version = 2014.2
|
||||||
summary = OpenStack servicevm/device manager
|
summary = OpenStack Tacker
|
||||||
description-file =
|
description-file =
|
||||||
README.rst
|
README.rst
|
||||||
author = OpenStack
|
author = OpenStack
|
||||||
@ -27,7 +27,7 @@ data_files =
|
|||||||
etc/tacker/tacker.conf
|
etc/tacker/tacker.conf
|
||||||
etc/tacker/rootwrap.conf
|
etc/tacker/rootwrap.conf
|
||||||
etc/rootwrap.d =
|
etc/rootwrap.d =
|
||||||
etc/tacker/rootwrap.d/servicevm.filters
|
etc/tacker/rootwrap.d/tacker.filters
|
||||||
etc/init.d = etc/init.d/tacker-server
|
etc/init.d = etc/init.d/tacker-server
|
||||||
|
|
||||||
[global]
|
[global]
|
||||||
@ -45,14 +45,14 @@ tacker.service_plugins =
|
|||||||
vnfm = tacker.vm.plugin:VNFMPlugin
|
vnfm = tacker.vm.plugin:VNFMPlugin
|
||||||
tacker.openstack.common.cache.backends =
|
tacker.openstack.common.cache.backends =
|
||||||
memory = tacker.openstack.common.cache._backends.memory:MemoryBackend
|
memory = tacker.openstack.common.cache._backends.memory:MemoryBackend
|
||||||
tacker.servicevm.device.drivers =
|
tacker.tacker.device.drivers =
|
||||||
noop = tacker.vm.drivers.noop:DeviceNoop
|
noop = tacker.vm.drivers.noop:DeviceNoop
|
||||||
nova = tacker.vm.drivers.nova.nova:DeviceNova
|
nova = tacker.vm.drivers.nova.nova:DeviceNova
|
||||||
heat = tacker.vm.drivers.heat.heat:DeviceHeat
|
heat = tacker.vm.drivers.heat.heat:DeviceHeat
|
||||||
tacker.servicevm.mgmt.drivers =
|
tacker.tacker.mgmt.drivers =
|
||||||
noop = tacker.vm.mgmt_drivers.noop:DeviceMgmtNoop
|
noop = tacker.vm.mgmt_drivers.noop:DeviceMgmtNoop
|
||||||
openwrt = tacker.vm.mgmt_drivers.openwrt.openwrt:DeviceMgmtOpenWRT
|
openwrt = tacker.vm.mgmt_drivers.openwrt.openwrt:DeviceMgmtOpenWRT
|
||||||
tacker.servicevm.monitor.drivers =
|
tacker.tacker.monitor.drivers =
|
||||||
ping = tacker.vm.monitor_drivers.ping.ping:VNFMonitorPing
|
ping = tacker.vm.monitor_drivers.ping.ping:VNFMonitorPing
|
||||||
http_ping = tacker.vm.monitor_drivers.http_ping.http_ping:VNFMonitorHTTPPing
|
http_ping = tacker.vm.monitor_drivers.http_ping.http_ping:VNFMonitorHTTPPing
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ OPTS = [
|
|||||||
help=_("Heat service URI to create VNF resources"
|
help=_("Heat service URI to create VNF resources"
|
||||||
"specified in the VNFD templates")),
|
"specified in the VNFD templates")),
|
||||||
]
|
]
|
||||||
CONF.register_opts(OPTS, group='servicevm_heat')
|
CONF.register_opts(OPTS, group='tacker_heat')
|
||||||
|
|
||||||
|
|
||||||
class OpenstackClients(object):
|
class OpenstackClients(object):
|
||||||
@ -49,7 +49,7 @@ class OpenstackClients(object):
|
|||||||
def _heat_client(self):
|
def _heat_client(self):
|
||||||
tenant_id = self.auth_token['tenant_id']
|
tenant_id = self.auth_token['tenant_id']
|
||||||
token = self.auth_token['id']
|
token = self.auth_token['id']
|
||||||
endpoint = CONF.servicevm_heat.heat_uri + '/' + tenant_id
|
endpoint = CONF.tacker_heat.heat_uri + '/' + tenant_id
|
||||||
return heatclient.Client('1', endpoint=endpoint, token=token)
|
return heatclient.Client('1', endpoint=endpoint, token=token)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""add tables for servicevm framework
|
"""add tables for tacker framework
|
||||||
|
|
||||||
Revision ID: 1c6b0d82afcd
|
Revision ID: 1c6b0d82afcd
|
||||||
Revises: 2db5203cb7a9
|
Revises: 2db5203cb7a9
|
||||||
|
@ -24,7 +24,7 @@ import uuid
|
|||||||
import mock
|
import mock
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from tacker.extensions import servicevm
|
from tacker.extensions import tacker
|
||||||
from tacker.plugins.common import constants
|
from tacker.plugins.common import constants
|
||||||
from tacker.tests.unit import test_api_v2
|
from tacker.tests.unit import test_api_v2
|
||||||
from tacker.tests.unit import test_api_v2_extension
|
from tacker.tests.unit import test_api_v2_extension
|
||||||
@ -34,24 +34,24 @@ _uuid = lambda: str(uuid.uuid4())
|
|||||||
_get_path = test_api_v2._get_path
|
_get_path = test_api_v2._get_path
|
||||||
|
|
||||||
|
|
||||||
class ServicevmExtensionTestCase(test_api_v2_extension.ExtensionTestCase):
|
class TackerExtensionTestCase(test_api_v2_extension.ExtensionTestCase):
|
||||||
fmt = 'json'
|
fmt = 'json'
|
||||||
|
|
||||||
_DEVICE_TEMPLATE = 'device_template'
|
_DEVICE_TEMPLATE = 'device_template'
|
||||||
_SERVICE_INSTANCE = 'service_instance'
|
_SERVICE_INSTANCE = 'service_instance'
|
||||||
_DEVICE = 'device'
|
_DEVICE = 'device'
|
||||||
|
|
||||||
_PATH_SERVICEVM = 'servicevm'
|
_PATH_TACKER = 'tacker'
|
||||||
_PATH_DEVICE_TEMPLATES = _PATH_SERVICEVM + '/device-templates'
|
_PATH_DEVICE_TEMPLATES = _PATH_TACKER + '/device-templates'
|
||||||
_PATH_SERVICE_INSTANCES = _PATH_SERVICEVM + '/service-instances'
|
_PATH_SERVICE_INSTANCES = _PATH_TACKER + '/service-instances'
|
||||||
_PATH_DEVICES = _PATH_SERVICEVM + '/devices'
|
_PATH_DEVICES = _PATH_TACKER + '/devices'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ServicevmExtensionTestCase, self).setUp()
|
super(TackerExtensionTestCase, self).setUp()
|
||||||
self._setUpExtension(
|
self._setUpExtension(
|
||||||
'tacker.extensions.servicevm.ServiceVMPluginBase',
|
'tacker.extensions.tacker.TackerPluginBase',
|
||||||
constants.SERVICEVM, servicevm.RESOURCE_ATTRIBUTE_MAP,
|
constants.TACKER, tacker.RESOURCE_ATTRIBUTE_MAP,
|
||||||
servicevm.Servicevm, self._PATH_SERVICEVM,
|
tacker.Tacker, self._PATH_TACKER,
|
||||||
translate_resource_name=True, use_quota=True)
|
translate_resource_name=True, use_quota=True)
|
||||||
|
|
||||||
# hosting device template
|
# hosting device template
|
||||||
@ -267,5 +267,5 @@ class ServicevmExtensionTestCase(test_api_v2_extension.ExtensionTestCase):
|
|||||||
self._test_entity_delete(self._DEVICE)
|
self._test_entity_delete(self._DEVICE)
|
||||||
|
|
||||||
|
|
||||||
class ServicevmExtensionTestCaseXML(ServicevmExtensionTestCase):
|
class TackerExtensionTestCaseXML(TackerExtensionTestCase):
|
||||||
fmt = 'xml'
|
fmt = 'xml'
|
||||||
|
@ -44,9 +44,9 @@ OPTS = [
|
|||||||
help=_("Wait time between two successive stack"
|
help=_("Wait time between two successive stack"
|
||||||
"create/delete retries")),
|
"create/delete retries")),
|
||||||
]
|
]
|
||||||
CONF.register_opts(OPTS, group='servicevm_heat')
|
CONF.register_opts(OPTS, group='tacker_heat')
|
||||||
STACK_RETRIES = cfg.CONF.servicevm_heat.stack_retries
|
STACK_RETRIES = cfg.CONF.tacker_heat.stack_retries
|
||||||
STACK_RETRY_WAIT = cfg.CONF.servicevm_heat.stack_retry_wait
|
STACK_RETRY_WAIT = cfg.CONF.tacker_heat.stack_retry_wait
|
||||||
|
|
||||||
HEAT_TEMPLATE_BASE = """
|
HEAT_TEMPLATE_BASE = """
|
||||||
heat_template_version: 2013-05-23
|
heat_template_version: 2013-05-23
|
||||||
|
@ -33,15 +33,15 @@ from tacker.vm.drivers import abstract_driver
|
|||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
NOVA_API_VERSION = "2"
|
NOVA_API_VERSION = "2"
|
||||||
SERVICEVM_NOVA_CONF_SECTION = 'servicevm_nova'
|
TACKER_NOVA_CONF_SECTION = 'tacker_nova'
|
||||||
ks_session.Session.register_conf_options(cfg.CONF, SERVICEVM_NOVA_CONF_SECTION)
|
ks_session.Session.register_conf_options(cfg.CONF, TACKER_NOVA_CONF_SECTION)
|
||||||
ks_auth.register_conf_options(cfg.CONF, SERVICEVM_NOVA_CONF_SECTION)
|
ks_auth.register_conf_options(cfg.CONF, TACKER_NOVA_CONF_SECTION)
|
||||||
OPTS = [
|
OPTS = [
|
||||||
cfg.StrOpt('region_name',
|
cfg.StrOpt('region_name',
|
||||||
help=_('Name of nova region to use. Useful if keystone manages'
|
help=_('Name of nova region to use. Useful if keystone manages'
|
||||||
' more than one region.')),
|
' more than one region.')),
|
||||||
]
|
]
|
||||||
CONF.register_opts(OPTS, group=SERVICEVM_NOVA_CONF_SECTION)
|
CONF.register_opts(OPTS, group=TACKER_NOVA_CONF_SECTION)
|
||||||
_NICS = 'nics' # converted by novaclient => 'networks'
|
_NICS = 'nics' # converted by novaclient => 'networks'
|
||||||
_NET_ID = 'net-id' # converted by novaclient => 'uuid'
|
_NET_ID = 'net-id' # converted by novaclient => 'uuid'
|
||||||
_PORT_ID = 'port-id' # converted by novaclient => 'port'
|
_PORT_ID = 'port-id' # converted by novaclient => 'port'
|
||||||
@ -81,7 +81,7 @@ class DeviceNova(abstract_driver.DeviceAbstractDriver):
|
|||||||
|
|
||||||
def _nova_client(self, token=None):
|
def _nova_client(self, token=None):
|
||||||
auth = ks_auth.load_from_conf_options(cfg.CONF,
|
auth = ks_auth.load_from_conf_options(cfg.CONF,
|
||||||
SERVICEVM_NOVA_CONF_SECTION)
|
TACKER_NOVA_CONF_SECTION)
|
||||||
endpoint_override = None
|
endpoint_override = None
|
||||||
|
|
||||||
if not auth:
|
if not auth:
|
||||||
@ -102,10 +102,10 @@ class DeviceNova(abstract_driver.DeviceAbstractDriver):
|
|||||||
endpoint_override=endpoint_override)
|
endpoint_override=endpoint_override)
|
||||||
|
|
||||||
session = ks_session.Session.load_from_conf_options(
|
session = ks_session.Session.load_from_conf_options(
|
||||||
cfg.CONF, SERVICEVM_NOVA_CONF_SECTION, auth=auth)
|
cfg.CONF, TACKER_NOVA_CONF_SECTION, auth=auth)
|
||||||
novaclient_cls = self._novaclient.get_client_class(NOVA_API_VERSION)
|
novaclient_cls = self._novaclient.get_client_class(NOVA_API_VERSION)
|
||||||
return novaclient_cls(session=session,
|
return novaclient_cls(session=session,
|
||||||
region_name=cfg.CONF.servicevm_nova.region_name)
|
region_name=cfg.CONF.tacker_nova.region_name)
|
||||||
|
|
||||||
def get_type(self):
|
def get_type(self):
|
||||||
return 'nova'
|
return 'nova'
|
||||||
|
@ -56,9 +56,9 @@ class VNFMonitor(object):
|
|||||||
'monitor_driver', default=[],
|
'monitor_driver', default=[],
|
||||||
help=_('Monitor driver to communicate with '
|
help=_('Monitor driver to communicate with '
|
||||||
'Hosting VNF/logical service '
|
'Hosting VNF/logical service '
|
||||||
'instance servicevm plugin will use')),
|
'instance tacker plugin will use')),
|
||||||
]
|
]
|
||||||
cfg.CONF.register_opts(OPTS, 'servicevm')
|
cfg.CONF.register_opts(OPTS, 'tacker')
|
||||||
|
|
||||||
def __new__(cls, boot_wait, check_intvl=None):
|
def __new__(cls, boot_wait, check_intvl=None):
|
||||||
if not cls._instance:
|
if not cls._instance:
|
||||||
@ -67,8 +67,8 @@ class VNFMonitor(object):
|
|||||||
|
|
||||||
def __init__(self, boot_wait, check_intvl=None):
|
def __init__(self, boot_wait, check_intvl=None):
|
||||||
self._monitor_manager = driver_manager.DriverManager(
|
self._monitor_manager = driver_manager.DriverManager(
|
||||||
'tacker.servicevm.monitor.drivers',
|
'tacker.tacker.monitor.drivers',
|
||||||
cfg.CONF.servicevm.monitor_driver)
|
cfg.CONF.tacker.monitor_driver)
|
||||||
|
|
||||||
self.boot_wait = boot_wait
|
self.boot_wait = boot_wait
|
||||||
if check_intvl is None:
|
if check_intvl is None:
|
||||||
|
@ -44,16 +44,16 @@ class VNFMMgmtMixin(object):
|
|||||||
'mgmt_driver', default=[],
|
'mgmt_driver', default=[],
|
||||||
help=_('MGMT driver to communicate with '
|
help=_('MGMT driver to communicate with '
|
||||||
'Hosting Device/logical service '
|
'Hosting Device/logical service '
|
||||||
'instance servicevm plugin will use')),
|
'instance tacker plugin will use')),
|
||||||
cfg.IntOpt('boot_wait', default=30,
|
cfg.IntOpt('boot_wait', default=30,
|
||||||
help=_('Time interval to wait for VM to boot')),
|
help=_('Time interval to wait for VM to boot')),
|
||||||
]
|
]
|
||||||
cfg.CONF.register_opts(OPTS, 'servicevm')
|
cfg.CONF.register_opts(OPTS, 'tacker')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(VNFMMgmtMixin, self).__init__()
|
super(VNFMMgmtMixin, self).__init__()
|
||||||
self._mgmt_manager = driver_manager.DriverManager(
|
self._mgmt_manager = driver_manager.DriverManager(
|
||||||
'tacker.servicevm.mgmt.drivers', cfg.CONF.servicevm.mgmt_driver)
|
'tacker.tacker.mgmt.drivers', cfg.CONF.tacker.mgmt_driver)
|
||||||
|
|
||||||
def _invoke(self, device_dict, **kwargs):
|
def _invoke(self, device_dict, **kwargs):
|
||||||
method = inspect.stack()[1][3]
|
method = inspect.stack()[1][3]
|
||||||
@ -101,21 +101,23 @@ class VNFMMgmtMixin(object):
|
|||||||
class VNFMPlugin(vm_db.VNFMPluginDb, VNFMMgmtMixin):
|
class VNFMPlugin(vm_db.VNFMPluginDb, VNFMMgmtMixin):
|
||||||
"""VNFMPlugin which supports VNFM framework."""
|
"""VNFMPlugin which supports VNFM framework."""
|
||||||
|
|
||||||
|
"""Plugin which supports Tacker framework
|
||||||
|
"""
|
||||||
OPTS = [
|
OPTS = [
|
||||||
cfg.ListOpt(
|
cfg.ListOpt(
|
||||||
'infra_driver', default=['heat'],
|
'infra_driver', default=['heat'],
|
||||||
help=_('Hosting device drivers servicevm plugin will use')),
|
help=_('Hosting device drivers tacker plugin will use')),
|
||||||
]
|
]
|
||||||
cfg.CONF.register_opts(OPTS, 'servicevm')
|
cfg.CONF.register_opts(OPTS, 'tacker')
|
||||||
supported_extension_aliases = ['vnfm']
|
supported_extension_aliases = ['vnfm']
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(VNFMPlugin, self).__init__()
|
super(VNFMPlugin, self).__init__()
|
||||||
self._pool = eventlet.GreenPool()
|
self._pool = eventlet.GreenPool()
|
||||||
self.boot_wait = cfg.CONF.servicevm.boot_wait
|
self.boot_wait = cfg.CONF.tacker.boot_wait
|
||||||
self._device_manager = driver_manager.DriverManager(
|
self._device_manager = driver_manager.DriverManager(
|
||||||
'tacker.servicevm.device.drivers',
|
'tacker.tacker.device.drivers',
|
||||||
cfg.CONF.servicevm.infra_driver)
|
cfg.CONF.tacker.infra_driver)
|
||||||
self._vnf_monitor = monitor.VNFMonitor(self.boot_wait)
|
self._vnf_monitor = monitor.VNFMonitor(self.boot_wait)
|
||||||
|
|
||||||
def spawn_n(self, function, *args, **kwargs):
|
def spawn_n(self, function, *args, **kwargs):
|
||||||
@ -136,7 +138,7 @@ class VNFMPlugin(vm_db.VNFMPluginDb, VNFMMgmtMixin):
|
|||||||
LOG.debug(_('unknown hosting device driver '
|
LOG.debug(_('unknown hosting device driver '
|
||||||
'%(infra_driver)s in %(drivers)s'),
|
'%(infra_driver)s in %(drivers)s'),
|
||||||
{'infra_driver': infra_driver,
|
{'infra_driver': infra_driver,
|
||||||
'drivers': cfg.CONF.servicevm.infra_driver})
|
'drivers': cfg.CONF.tacker.infra_driver})
|
||||||
raise vnfm.InvalidInfraDriver(infra_driver=infra_driver)
|
raise vnfm.InvalidInfraDriver(infra_driver=infra_driver)
|
||||||
|
|
||||||
service_types = template.get('service_types')
|
service_types = template.get('service_types')
|
||||||
|
Loading…
Reference in New Issue
Block a user