Esempio n. 1
0
 def create_server(self, context):
     with context.session.begin(subtransactions=True):
         cfg.CONF.uuid = str(uuid.uuid4())
         server_db = Server(id=cfg.CONF.uuid,
                            status="active",
                            role="normal",
                            description="hostname: " + get_hostname(),
                            updated_at=timeutils.utcnow(),
                            created_at=timeutils.utcnow())
         context.session.add(server_db)
     LOG.debug("Server item is created in DB")
     server_dict = self._make_server_dict(server_db)
     return server_dict
Esempio n. 2
0
#    License for the specific language governing permissions and limitations
#    under the License.
#

from oslo_config import cfg
from oslo_log import log as logging
import random
import string
from tacker.common import utils
from tacker.vnfm.monitor_drivers import abstract_driver


LOG = logging.getLogger(__name__)

OPTS = [
    cfg.StrOpt('host', default=utils.get_hostname(),
               help=_('Address which drivers use to trigger')),
    cfg.PortOpt('port', default=9890,
               help=_('port number which drivers use to trigger'))
]
cfg.CONF.register_opts(OPTS, group='ceilometer')


def config_opts():
    return [('ceilometer', OPTS)]

ALARM_INFO = (
    ALARM_ACTIONS, OK_ACTIONS, REPEAT_ACTIONS, ALARM,
    INSUFFICIENT_DATA_ACTIONS, DESCRIPTION, ENABLED, TIME_CONSTRAINTS,
    SEVERITY,
) = ('alarm_actions', 'ok_actions', 'repeat_actions', 'alarm',
Esempio n. 3
0
#    License for the specific language governing permissions and limitations
#    under the License.
#

from oslo_config import cfg
from oslo_log import log as logging
import random
import string
from tacker.common import utils
from tacker.vnfm.monitor_drivers import abstract_driver

LOG = logging.getLogger(__name__)

OPTS = [
    cfg.HostAddressOpt('host',
                       default=utils.get_hostname(),
                       help=_('Address which drivers use to trigger')),
    cfg.PortOpt('port',
                default=9890,
                help=_('port number which drivers use to trigger'))
]
cfg.CONF.register_opts(OPTS, group='ceilometer')


def config_opts():
    return [('ceilometer', OPTS)]


ALARM_INFO = (
    ALARM_ACTIONS,
    OK_ACTIONS,
Esempio n. 4
0
#    License for the specific language governing permissions and limitations
#    under the License.
#

from oslo_config import cfg
from oslo_log import log as logging
import random
import string
from tacker.common import utils
from tacker.vnfm.monitor_drivers import abstract_driver


LOG = logging.getLogger(__name__)

OPTS = [
    cfg.HostAddressOpt('host', default=utils.get_hostname(),
                       help=_('Address which drivers use to trigger')),
    cfg.PortOpt('port', default=9890,
               help=_('port number which drivers use to trigger'))
]
cfg.CONF.register_opts(OPTS, group='ceilometer')


def config_opts():
    return [('ceilometer', OPTS)]

ALARM_INFO = (
    ALARM_ACTIONS, OK_ACTIONS, REPEAT_ACTIONS, ALARM,
    INSUFFICIENT_DATA_ACTIONS, DESCRIPTION, ENABLED, TIME_CONSTRAINTS,
    SEVERITY,
) = ('alarm_actions', 'ok_actions', 'repeat_actions', 'alarm',
Esempio n. 5
0
#

import netaddr

from oslo_config import cfg
from oslo_log import log as logging
import random
import string
from tacker.common import utils
from tacker.vnfm.monitor_drivers import abstract_driver


LOG = logging.getLogger(__name__)

OPTS = [
    cfg.HostAddressOpt('host', default=utils.get_hostname(),
                       help=_('Address which drivers use to trigger')),
    cfg.PortOpt('port', default=9890,
               help=_('port number which drivers use to trigger'))
]
cfg.CONF.register_opts(OPTS, group='ceilometer')


def config_opts():
    return [('ceilometer', OPTS)]

ALARM_INFO = (
    ALARM_ACTIONS, OK_ACTIONS, REPEAT_ACTIONS, ALARM,
    INSUFFICIENT_DATA_ACTIONS, DESCRIPTION, ENABLED, TIME_CONSTRAINTS,
    SEVERITY,
) = ('alarm_actions', 'ok_actions', 'repeat_actions', 'alarm',
Esempio n. 6
0
             help=_("The service plugins Tacker will use")),
 cfg.StrOpt('policy_file', default="policy.json",
            help=_("The policy file to use")),
 cfg.StrOpt('auth_strategy', default='keystone',
            help=_("The type of authentication to use")),
 cfg.BoolOpt('allow_bulk', default=True,
             help=_("Allow the usage of the bulk API")),
 cfg.BoolOpt('allow_pagination', default=False,
             help=_("Allow the usage of the pagination")),
 cfg.BoolOpt('allow_sorting', default=False,
             help=_("Allow the usage of the sorting")),
 cfg.StrOpt('pagination_max_limit', default="-1",
            help=_("The maximum number of items returned in a single "
                   "response, value was 'infinite' or negative integer "
                   "means no limit")),
 cfg.StrOpt('host', default=utils.get_hostname(),
            help=_("The hostname Tacker is running on")),
 cfg.StrOpt('nova_url',
            default='http://127.0.0.1:8774/v2',
            help=_('URL for connection to nova')),
 cfg.StrOpt('nova_admin_username',
            help=_('Username for connecting to nova in admin context')),
 cfg.StrOpt('nova_admin_password',
            help=_('Password for connection to nova in admin context'),
            secret=True),
 cfg.StrOpt('nova_admin_tenant_id',
            help=_('The uuid of the admin nova tenant')),
 cfg.StrOpt('nova_admin_auth_url',
            default='http://localhost:5000/v2.0',
            help=_('Authorization URL for connecting to nova in admin '
                   'context')),
Esempio n. 7
0
    cfg.ListOpt("service_plugins", default=["nfvo", "vnfm"], help=_("The service plugins Tacker will use")),
    cfg.StrOpt("policy_file", default="policy.json", help=_("The policy file to use")),
    cfg.StrOpt("auth_strategy", default="keystone", help=_("The type of authentication to use")),
    cfg.BoolOpt("allow_bulk", default=True, help=_("Allow the usage of the bulk API")),
    cfg.BoolOpt("allow_pagination", default=False, help=_("Allow the usage of the pagination")),
    cfg.BoolOpt("allow_sorting", default=False, help=_("Allow the usage of the sorting")),
    cfg.StrOpt(
        "pagination_max_limit",
        default="-1",
        help=_(
            "The maximum number of items returned in a single "
            "response, value was 'infinite' or negative integer "
            "means no limit"
        ),
    ),
    cfg.StrOpt("host", default=utils.get_hostname(), help=_("The hostname Tacker is running on")),
    cfg.StrOpt("nova_url", default="http://127.0.0.1:8774/v2", help=_("URL for connection to nova")),
    cfg.StrOpt("nova_admin_username", help=_("Username for connecting to nova in admin context")),
    cfg.StrOpt("nova_admin_password", help=_("Password for connection to nova in admin context"), secret=True),
    cfg.StrOpt("nova_admin_tenant_id", help=_("The uuid of the admin nova tenant")),
    cfg.StrOpt(
        "nova_admin_auth_url",
        default="http://localhost:5000/v2.0",
        help=_("Authorization URL for connecting to nova in admin " "context"),
    ),
    cfg.StrOpt("nova_ca_certificates_file", help=_("CA file for novaclient to verify server certificates")),
    cfg.BoolOpt("nova_api_insecure", default=False, help=_("If True, ignore any SSL validation issues")),
    cfg.StrOpt(
        "nova_region_name", help=_("Name of nova region to use. Useful if keystone manages" " more than one region.")
    ),
]
Esempio n. 8
0
     'allow_pagination',
     default=False,
     help=_("Allow the usage of the pagination")),
 cfg.BoolOpt(
     'allow_sorting',
     default=False,
     help=_("Allow the usage of the sorting")),
 cfg.StrOpt(
     'pagination_max_limit',
     default="-1",
     help=_("The maximum number of items returned in a single "
            "response, value was 'infinite' or negative integer "
            "means no limit")),
 cfg.StrOpt(
     'host',
     default=utils.get_hostname(),
     help=_("The hostname Tacker is running on")),
 cfg.StrOpt(
     'nova_url',
     default='http://127.0.0.1:8774/v2',
     help=_('URL for connection to nova')),
 cfg.StrOpt(
     'nova_admin_username',
     help=_('Username for connecting to nova in admin context')),
 cfg.StrOpt(
     'nova_admin_password',
     help=_('Password for connection to nova in admin context'),
     secret=True),
 cfg.StrOpt(
     'nova_admin_tenant_id', help=_('The uuid of the admin nova tenant')),
 cfg.StrOpt(