Example #1
0
def set_defaults(conf):
    _safe_set_of_opts(conf, 'verbose', True)
    _safe_set_of_opts(
        conf, 'state_path',
        os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
    _safe_set_of_opts(conf, 'connection', "sqlite://", group='database')
    _safe_set_of_opts(conf, 'sqlite_synchronous', False)
    _POLICY_PATH = os.path.abspath(
        os.path.join(CONF.state_path, 'manila/tests/policy.json'))
    opts.set_defaults(conf, policy_file=_POLICY_PATH)
    _safe_set_of_opts(conf, 'share_export_ip', '0.0.0.0')
    _safe_set_of_opts(conf, 'service_instance_user', 'fake_user')
    _API_PASTE_PATH = os.path.abspath(
        os.path.join(CONF.state_path, 'etc/manila/api-paste.ini'))
    wsgi.register_opts(conf)
    _safe_set_of_opts(conf, 'api_paste_config', _API_PASTE_PATH)
    _safe_set_of_opts(conf, 'share_driver',
                      'manila.tests.fake_driver.FakeShareDriver')
    _safe_set_of_opts(conf, 'auth_strategy', 'noauth')

    _safe_set_of_opts(conf, 'zfs_share_export_ip', '1.1.1.1')
    _safe_set_of_opts(conf, 'zfs_service_ip', '2.2.2.2')
    _safe_set_of_opts(conf, 'zfs_zpool_list', ['foo', 'bar'])
    _safe_set_of_opts(conf, 'zfs_share_helpers', 'NFS=foo.bar.Helper')
    _safe_set_of_opts(conf, 'zfs_replica_snapshot_prefix', 'foo_prefix_')

    _safe_set_of_opts(conf, 'hitachi_hsp_host', '172.24.47.190')
    _safe_set_of_opts(conf, 'hitachi_hsp_username', 'hsp_user')
    _safe_set_of_opts(conf, 'hitachi_hsp_password', 'hsp_password')

    _safe_set_of_opts(conf, 'qnap_management_url', 'http://1.2.3.4:8080')
    _safe_set_of_opts(conf, 'qnap_share_ip', '1.2.3.4')
    _safe_set_of_opts(conf, 'qnap_nas_login', 'admin')
    _safe_set_of_opts(conf, 'qnap_nas_password', 'qnapadmin')
    _safe_set_of_opts(conf, 'qnap_poolname', 'Storage Pool 1')
    def __init__(self, config_path=None):
        """Initialize the loader, and attempt to find the config.

        :param config_path: Full or relative path to the paste config.
        :returns: None

        """
        wsgi.register_opts(CONF)  # noqa
        config_path = config_path or CONF.api_paste_config
        self.config_path = utils.find_config(config_path)
Example #3
0
def set_defaults(conf):
    _safe_set_of_opts(conf, 'verbose', True)
    _safe_set_of_opts(conf, 'state_path', os.path.abspath(
        os.path.join(os.path.dirname(__file__),
                     '..',
                     '..')))
    _safe_set_of_opts(conf, 'connection', "sqlite://", group='database')
    _safe_set_of_opts(conf, 'sqlite_synchronous', False)
    _POLICY_PATH = os.path.abspath(os.path.join(CONF.state_path,
                                                'manila/tests/policy.yaml'))
    opts.set_defaults(conf, policy_file=_POLICY_PATH)
    _safe_set_of_opts(conf, 'share_export_ip', '0.0.0.0')
    _safe_set_of_opts(conf, 'service_instance_user', 'fake_user')
    _API_PASTE_PATH = os.path.abspath(os.path.join(CONF.state_path,
                                                   'etc/manila/api-paste.ini'))
    wsgi.register_opts(conf)
    _safe_set_of_opts(conf, 'api_paste_config', _API_PASTE_PATH)
    # we use "fake" and "openstack" as project ID in a number of tests
    _safe_set_of_opts(conf, 'project_id_regex', r"[0-9a-fopnstk\-]+")
    _safe_set_of_opts(conf, 'share_driver',
                      'manila.tests.fake_driver.FakeShareDriver')
    _safe_set_of_opts(conf, 'auth_strategy', 'noauth')

    _safe_set_of_opts(conf, 'zfs_share_export_ip', '1.1.1.1')
    _safe_set_of_opts(conf, 'zfs_service_ip', '2.2.2.2')
    _safe_set_of_opts(conf, 'zfs_zpool_list', ['foo', 'bar'])
    _safe_set_of_opts(conf, 'zfs_share_helpers', 'NFS=foo.bar.Helper')
    _safe_set_of_opts(conf, 'zfs_replica_snapshot_prefix', 'foo_prefix_')

    _safe_set_of_opts(conf, 'hitachi_hsp_host', '172.24.47.190')
    _safe_set_of_opts(conf, 'hitachi_hsp_username', 'hsp_user')
    _safe_set_of_opts(conf, 'hitachi_hsp_password', 'hsp_password')

    _safe_set_of_opts(conf, 'as13000_nas_ip', '1.1.1.1')
    _safe_set_of_opts(conf, 'as13000_nas_login', 'admin')
    _safe_set_of_opts(conf, 'as13000_nas_password', 'password')
    _safe_set_of_opts(conf, 'as13000_share_pools', 'pool0')

    _safe_set_of_opts(conf, 'instorage_nas_ip', '1.1.1.1')
    _safe_set_of_opts(conf, 'instorage_nas_login', 'admin')
    _safe_set_of_opts(conf, 'instorage_nas_password', 'password')
    _safe_set_of_opts(conf, 'instorage_nas_pools', 'pool0')

    _safe_set_of_opts(conf, 'infortrend_nas_ip', '172.27.1.1')
    _safe_set_of_opts(conf, 'infortrend_share_pools', 'share-pool-01')
    _safe_set_of_opts(conf, 'infortrend_share_channels', '0,1')

    _safe_set_of_opts(conf, 'qnap_management_url', 'http://1.2.3.4:8080')
    _safe_set_of_opts(conf, 'qnap_share_ip', '1.2.3.4')
    _safe_set_of_opts(conf, 'qnap_nas_login', 'admin')
    _safe_set_of_opts(conf, 'qnap_nas_password', 'qnapadmin')
    _safe_set_of_opts(conf, 'qnap_poolname', 'Storage Pool 1')

    _safe_set_of_opts(conf, 'unity_server_meta_pool', 'nas_server_pool')
Example #4
0
def set_defaults(conf):
    _safe_set_of_opts(conf, 'verbose', True)
    _safe_set_of_opts(
        conf, 'state_path',
        os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
    _safe_set_of_opts(conf, 'connection', "sqlite://", group='database')
    _safe_set_of_opts(conf, 'sqlite_synchronous', False)
    _API_PASTE_PATH = os.path.abspath(
        os.path.join(CONF.state_path, 'etc/delfin/api-paste.ini'))
    wsgi.register_opts(conf)
    _safe_set_of_opts(conf, 'api_paste_config', _API_PASTE_PATH)
Example #5
0
def init(args, **kwargs):
    product_name = 'hypernet_agentless'

    logging.register_options(cfg.CONF)

    wsgi.register_opts(cfg.CONF) 
    cfg.CONF.register_opts(service.list_opts()[0][1])
    sslutils.register_opts(cfg.CONF)

    cfg.CONF(args=args, project=product_name,
             version='%%(prog)s %s' % version.version_info.release_string(),
             **kwargs)

    logging.setup(cfg.CONF, product_name)
    rpc.init(cfg.CONF)
Example #6
0
def register_core_common_config_opts(cfg=cfg.CONF):
    cfg.register_opts(core_opts)
    cfg.register_cli_opts(core_cli_opts)
    wsgi.register_opts(cfg)
Example #7
0
    cfg.BoolOpt('vlan_transparent', default=False,
                help=_('If True, then allow plugins that support it to '
                       'create VLAN transparent networks.')),
]

core_cli_opts = [
    cfg.StrOpt('state_path',
               default='/var/lib/neutron',
               help=_("Where to store Neutron state files. "
                      "This directory must be writable by the agent.")),
]

# Register the configuration options
cfg.CONF.register_opts(core_opts)
cfg.CONF.register_cli_opts(core_cli_opts)
wsgi.register_opts(cfg.CONF)

# Ensure that the control exchange is set correctly
oslo_messaging.set_transport_defaults(control_exchange='neutron')


def set_db_defaults():
    # Update the default QueuePool parameters. These can be tweaked by the
    # conf variables - max_pool_size, max_overflow and pool_timeout
    db_options.set_defaults(
        cfg.CONF,
        connection='sqlite://',
        sqlite_db='', max_pool_size=10,
        max_overflow=20, pool_timeout=10)

set_db_defaults()
Example #8
0
                default=False,
                help=_('If True, then allow plugins that support it to '
                       'create VLAN transparent networks.')),
]

core_cli_opts = [
    cfg.StrOpt('state_path',
               default='/var/lib/neutron',
               help=_("Where to store Neutron state files. "
                      "This directory must be writable by the agent.")),
]

# Register the configuration options
cfg.CONF.register_opts(core_opts)
cfg.CONF.register_cli_opts(core_cli_opts)
wsgi.register_opts(cfg.CONF)

# Ensure that the control exchange is set correctly
oslo_messaging.set_transport_defaults(control_exchange='neutron')


def set_db_defaults():
    # Update the default QueuePool parameters. These can be tweaked by the
    # conf variables - max_pool_size, max_overflow and pool_timeout
    db_options.set_defaults(cfg.CONF,
                            connection='sqlite://',
                            sqlite_db='',
                            max_pool_size=10,
                            max_overflow=20,
                            pool_timeout=10)
Example #9
0
def register_socket_opts(cfg=cfg.CONF):
    cfg.register_opts(socket_opts)
    wsgi.register_opts(cfg)
Example #10
0
def register_core_common_config_opts(cfg=cfg.CONF):
    cfg.register_opts(core_opts)
    cfg.register_cli_opts(core_cli_opts)
    wsgi.register_opts(cfg)
Example #11
0
def register_core_common_config_opts(cfg=cfg.CONF):
    cfg.register_opts(core_opts)
    cfg.register_cli_opts(core_cli_opts)
    cfg.register_opts(keystone_opts, "KEYSTONE_AUTHTOKEN")
    wsgi.register_opts(cfg)
Example #12
0
def register_socket_opts(cfg=cfg.CONF):
    cfg.register_opts(socket_opts)
    wsgi.register_opts(cfg)