当前位置: 首页>>代码示例>>Python>>正文


Python paths.state_path_def函数代码示例

本文整理汇总了Python中nova.conf.paths.state_path_def函数的典型用法代码示例。如果您正苦于以下问题:Python state_path_def函数的具体用法?Python state_path_def怎么用?Python state_path_def使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了state_path_def函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        super(ConfFixture, self).setUp()

        # default group
        self.conf.set_default('compute_driver', 'fake.SmallFakeDriver')
        self.conf.set_default('fake_network', True)
        self.conf.set_default('flat_network_bridge', 'br100')
        self.conf.set_default('floating_ip_dns_manager',
                              'nova.tests.unit.utils.dns_manager')
        self.conf.set_default('force_dhcp_release', False)
        self.conf.set_default('host', 'fake-mini')
        self.conf.set_default('instance_dns_manager',
                              'nova.tests.unit.utils.dns_manager')
        self.conf.set_default('network_size', 8)
        self.conf.set_default('num_networks', 2)
        self.conf.set_default('periodic_enable', False)
        # TODO(sdague): this makes our project_id match 'fake' as well.
        # We should fix the tests to use real
        # UUIDs then drop this work around.
        self.conf.set_default('project_id_regex',
                              '[0-9a-fk\-]+', 'osapi_v21')
        self.conf.set_default('use_ipv6', True)
        self.conf.set_default('vlan_interface', 'eth0')

        # api group
        self.conf.set_default('auth_strategy', 'noauth2', group='api')

        # api_database group
        self.conf.set_default('connection', "sqlite://", group='api_database')
        self.conf.set_default('sqlite_synchronous', False,
                              group='api_database')

        # database group
        self.conf.set_default('connection', "sqlite://", group='database')
        self.conf.set_default('sqlite_synchronous', False, group='database')

        # key_manager group
        self.conf.set_default('api_class',
                              'nova.keymgr.conf_key_mgr.ConfKeyManager',
                              group='key_manager')

        # wsgi group
        self.conf.set_default('api_paste_config',
                              paths.state_path_def('etc/nova/api-paste.ini'),
                              group='wsgi')
        # The functional tests run wsgi API services using fixtures and
        # eventlet and we want one connection per request so things don't
        # leak between requests from separate services in concurrently running
        # tests.
        self.conf.set_default('keep_alive', False, group="wsgi")

        # placement group
        self.conf.set_default('os_region_name', 'RegionOne',
                              group='placement')

        config.parse_args([], default_config_files=[], configure_db=False,
                          init_rpc=False)
        policy_opts.set_defaults(self.conf)
        self.addCleanup(utils.cleanup_dns_managers)
        self.addCleanup(ipv6.api.reset_backend)
开发者ID:Juniper,项目名称:nova,代码行数:60,代码来源:conf_fixture.py

示例2: setUp

 def setUp(self):
     super(PlacementPolicyFixture, self).setUp()
     policy_file = paths.state_path_def('etc/nova/placement-policy.yaml')
     CONF.set_override('policy_file', policy_file, group='placement')
     placement_policy.reset()
     placement_policy.init()
     self.addCleanup(placement_policy.reset)
开发者ID:arbrandes,项目名称:nova,代码行数:7,代码来源:policy_fixture.py

示例3: setUp

 def setUp(self):
     super(RealPolicyFixture, self).setUp()
     # policy_file can be overridden by subclasses
     self.policy_file = paths.state_path_def('etc/nova/policy.json')
     self._prepare_policy()
     CONF.set_override('policy_file', self.policy_file, group='oslo_policy')
     nova.policy.reset()
     nova.policy.init()
     self.addCleanup(nova.policy.reset)
开发者ID:Juniper,项目名称:nova,代码行数:9,代码来源:policy_fixture.py

示例4: setUp

 def setUp(self):
     super(ApiPasteV21Fixture, self).setUp()
     CONF.set_default('api_paste_config',
                      paths.state_path_def('etc/nova/api-paste.ini'),
                      group='wsgi')
     tmp_api_paste_dir = self.useFixture(fixtures.TempDir())
     tmp_api_paste_file_name = os.path.join(tmp_api_paste_dir.path,
                                            'fake_api_paste.ini')
     with open(CONF.wsgi.api_paste_config, 'r') as orig_api_paste:
         with open(tmp_api_paste_file_name, 'w') as tmp_file:
             for line in orig_api_paste:
                 self._replace_line(tmp_file, line)
     CONF.set_override('api_paste_config', tmp_api_paste_file_name,
                       group='wsgi')
开发者ID:4everming,项目名称:nova,代码行数:14,代码来源:api_paste_fixture.py

示例5: setUp

 def setUp(self):
     super(ConfFixture, self).setUp()
     self.conf.set_default('api_paste_config',
                           paths.state_path_def('etc/nova/api-paste.ini'),
                           group='wsgi')
     self.conf.set_default('host', 'fake-mini')
     self.conf.set_default('compute_driver',
                           'nova.virt.fake.SmallFakeDriver')
     self.conf.set_default('fake_network', True)
     self.conf.set_default('flat_network_bridge', 'br100')
     self.conf.set_default('floating_ip_dns_manager',
                           'nova.tests.unit.utils.dns_manager')
     self.conf.set_default('instance_dns_manager',
                           'nova.tests.unit.utils.dns_manager')
     self.conf.set_default('network_size', 8)
     self.conf.set_default('num_networks', 2)
     self.conf.set_default('use_ipv6', True)
     self.conf.set_default('vlan_interface', 'eth0')
     self.conf.set_default('auth_strategy', 'noauth2')
     config.parse_args([], default_config_files=[], configure_db=False,
                       init_rpc=False)
     self.conf.set_default('connection', "sqlite://", group='database')
     self.conf.set_default('connection', "sqlite://", group='api_database')
     self.conf.set_default('sqlite_synchronous', False, group='database')
     self.conf.set_default('sqlite_synchronous', False,
             group='api_database')
     self.conf.set_default('fatal_exception_format_errors', True)
     # TODO(sdague): this makes our project_id match 'fake' as well.
     # We should fix the tests to use real
     # UUIDs then drop this work around.
     self.conf.set_default('project_id_regex',
                           '[0-9a-fk\-]+', 'osapi_v21')
     self.conf.set_default('force_dhcp_release', False)
     self.conf.set_default('periodic_enable', False)
     self.conf.set_default('api_class',
                           'nova.keymgr.conf_key_mgr.ConfKeyManager',
                           group='key_manager')
     policy_opts.set_defaults(self.conf)
     self.addCleanup(utils.cleanup_dns_managers)
     self.addCleanup(ipv6.api.reset_backend)
开发者ID:startover,项目名称:nova,代码行数:40,代码来源:conf_fixture.py

示例6: rbd

    cfg.StrOpt('rbd_user',
               help="""
The RADOS client name for accessing rbd(RADOS Block Devices) volumes.

Libvirt will refer to this user when connecting and authenticating with
the Ceph RBD server.
"""),
    cfg.StrOpt('rbd_secret_uuid',
               help="""
The libvirt UUID of the secret for the rbd_user volumes.
"""),
]

libvirt_volume_nfs_opts = [
    cfg.StrOpt('nfs_mount_point_base',
               default=paths.state_path_def('mnt'),
               help="""
Directory where the NFS volume is mounted on the compute node.
The default is 'mnt' directory of the location where nova's Python module
is installed.

NFS provides shared storage for the OpenStack Block Storage service.

Possible values:

* A string representing absolute path of mount point.
"""),
    cfg.StrOpt('nfs_mount_options',
               help="""
Mount options passed to the NFS client. See section of the nfs man page
for details.
开发者ID:mahak,项目名称:nova,代码行数:31,代码来源:libvirt.py

示例7:

linux_net_opts = [
    cfg.MultiStrOpt('dhcpbridge_flagfile',
            default=['/etc/nova/nova-dhcpbridge.conf'],
            help="""
This option is a list of full paths to one or more configuration files for
dhcpbridge. In most cases the default path of '/etc/nova/nova-dhcpbridge.conf'
should be sufficient, but if you have special needs for configuring dhcpbridge,
you can change or add to this list.

Possible values

    A list of strings, where each string is the full path to a dhcpbridge
    configuration file.
"""),
    cfg.StrOpt('networks_path',
            default=paths.state_path_def('networks'),
            help="""
The location where the network configuration files will be kept. The default is
the 'networks' directory off of the location where nova's Python module is
installed.

Possible values

    A string containing the full path to the desired configuration directory
"""),
    cfg.StrOpt('public_interface',
            default='eth0',
            help="""
This is the name of the network interface for public IP addresses. The default
is 'eth0'.
开发者ID:JohnLih,项目名称:nova,代码行数:30,代码来源:network.py

示例8:

Name of the network to be used to set access IPs for instances. If there are
multiple IPs to choose from, an arbitrary one will be chosen.

Possible values:

* None (default)
* Any string representing network name.
"""),
    cfg.BoolOpt('defer_iptables_apply',
        default=False,
        help="""
Whether to batch up the application of IPTables rules during a host restart
and apply all at the end of the init phase.
"""),
    cfg.StrOpt('instances_path',
        default=paths.state_path_def('instances'),
        sample_default="$state_path/instances",
        help="""
Specifies where instances are stored on the hypervisor's disk.
It can point to locally attached storage or a directory on NFS.

Possible values:

* $state_path/instances where state_path is a config option that specifies
  the top-level directory for maintaining nova's state. (default) or
  Any string representing directory path.
"""),
    cfg.BoolOpt('instance_usage_audit',
        default=False,
        help="""
This option enables periodic compute.instance.exists notifications. Each
开发者ID:klmitch,项目名称:nova,代码行数:31,代码来源:compute.py

示例9:

     default='cacert.pem',
     deprecated_group='DEFAULT',
     help=_('Filename of root CA')),
 cfg.StrOpt(
     'key_file',
     default=os.path.join('private', 'cakey.pem'),
     deprecated_group='DEFAULT',
     help=_('Filename of private key')),
 cfg.StrOpt(
     'crl_file',
     default='crl.pem',
     deprecated_group='DEFAULT',
     help=_('Filename of root Certificate Revocation List')),
 cfg.StrOpt(
     'keys_path',
     default=paths.state_path_def('keys'),
     deprecated_group='DEFAULT',
     help=_('Where we keep our keys')),
 cfg.StrOpt(
     'ca_path',
     default=paths.state_path_def('CA'),
     deprecated_group='DEFAULT',
     help=_('Where we keep our root CA')),
 cfg.BoolOpt(
     'use_project_ca',
     default=False,
     deprecated_group='DEFAULT',
     help=_('Should we use a CA for each project?')),
 cfg.StrOpt(
     'user_cert_subject',
     default='/C=US/ST=California/O=OpenStack/'
开发者ID:BeyondTheClouds,项目名称:nova,代码行数:31,代码来源:crypto.py

示例10: NOTE

#    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.

from nova.conf import paths

from oslo_config import cfg
from oslo_db import options as oslo_db_options

_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('nova.sqlite')


# NOTE(sdague): we know of at least 1 instance of out of tree usage
# for this config in RAX. They used this because of performance issues
# with some queries. We think the right path forward is fixing the
# SQLA queries to be more performant for everyone.
db_driver_opt = cfg.StrOpt(
        'db_driver',
        default='nova.db',
        deprecated_for_removal=True,
        deprecated_since='13.0.0',
        help='The driver to use for database access')


# NOTE(markus_z): We cannot simply do:
开发者ID:amadev,项目名称:nova,代码行数:31,代码来源:database.py

示例11: List

        help="""
Filename of root Certificate Revocation List (CRL). This is a list of
certificates that have been revoked, and therefore, entities presenting
those (revoked) certificates should no longer be trusted.

* Possible values:

    crl.pem is default

* Related options:

    ca_path
"""),
    cfg.StrOpt(
        "keys_path",
        default=paths.state_path_def("keys"),
        deprecated_group="DEFAULT",
        help="""
Directory path where keys are located.

* Possible values:

    $state_path/keys is default.

* Related options:

    key_file
"""),
    cfg.StrOpt(
        "ca_path",
        default=paths.state_path_def("CA"),
开发者ID:CHOIHEESEOK,项目名称:nova,代码行数:31,代码来源:crypto.py

示例12: of

    cfg.BoolOpt(
        "volume_use_multipath",
        default=False,
        deprecated_name="iscsi_use_multipath",
        help="Use multipath connection of the iSCSI or FC volume",
    ),
]

libvirt_volume_aoe_opts = [
    cfg.IntOpt("num_aoe_discover_tries", default=3, help="Number of times to rediscover AoE target to find volume")
]

libvirt_volume_glusterfs_opts = [
    cfg.StrOpt(
        "glusterfs_mount_point_base",
        default=paths.state_path_def("mnt"),
        help="Directory where the glusterfs volume is mounted on the " "compute node",
    )
]

libvirt_volume_iscsi_opts = [
    cfg.IntOpt("num_iscsi_scan_tries", default=5, help="Number of times to rescan iSCSI target to find volume"),
    cfg.StrOpt(
        "iscsi_iface",
        deprecated_name="iscsi_transport",
        help="The iSCSI transport iface to use to connect to target in "
        "case offload support is desired. Default format is of "
        "the form <transport_name>.<hwaddress> where "
        "<transport_name> is one of (be2iscsi, bnx2i, cxgb3i, "
        "cxgb4i, qla4xxx, ocs) and <hwaddress> is the MAC address "
        "of the interface and can be generated via the "
开发者ID:hanlind,项目名称:nova,代码行数:31,代码来源:libvirt.py


注:本文中的nova.conf.paths.state_path_def函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。