Move os_* options into a group
Change-Id: I1c4942cdc474658222ab3ddcd71849150bbc8db4 Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
522e6324b6
commit
b2d7ecc4ce
@ -69,10 +69,10 @@ class AgentManager(agent.AgentManager):
|
|||||||
|
|
||||||
def interval_task(self, task):
|
def interval_task(self, task):
|
||||||
self.keystone = ksclient.Client(
|
self.keystone = ksclient.Client(
|
||||||
username=cfg.CONF.os_username,
|
username=cfg.CONF.service_credentials.os_username,
|
||||||
password=cfg.CONF.os_password,
|
password=cfg.CONF.service_credentials.os_password,
|
||||||
tenant_id=cfg.CONF.os_tenant_id,
|
tenant_id=cfg.CONF.service_credentials.os_tenant_id,
|
||||||
tenant_name=cfg.CONF.os_tenant_name,
|
tenant_name=cfg.CONF.service_credentials.os_tenant_name,
|
||||||
auth_url=cfg.CONF.os_auth_url)
|
auth_url=cfg.CONF.service_credentials.os_auth_url)
|
||||||
|
|
||||||
super(AgentManager, self).interval_task(task)
|
super(AgentManager, self).interval_task(task)
|
||||||
|
@ -42,13 +42,14 @@ class Client(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Returns a nova Client object."""
|
"""Returns a nova Client object."""
|
||||||
conf = cfg.CONF
|
conf = cfg.CONF.service_credentials
|
||||||
tenant = conf.os_tenant_id and conf.os_tenant_id or conf.os_tenant_name
|
tenant = conf.os_tenant_id and conf.os_tenant_id or conf.os_tenant_name
|
||||||
self.nova_client = nova_client.Client(username=cfg.CONF.os_username,
|
self.nova_client = nova_client.Client(
|
||||||
api_key=cfg.CONF.os_password,
|
username=cfg.CONF.service_credentials.os_username,
|
||||||
project_id=tenant,
|
api_key=cfg.CONF.service_credentials.os_password,
|
||||||
auth_url=cfg.CONF.os_auth_url,
|
project_id=tenant,
|
||||||
no_cache=True)
|
auth_url=cfg.CONF.service_credentials.os_auth_url,
|
||||||
|
no_cache=True)
|
||||||
|
|
||||||
def _with_flavor(self, instances):
|
def _with_flavor(self, instances):
|
||||||
flavors = dict((f.id, f) for f in self.nova_client.flavors.list())
|
flavors = dict((f.id, f) for f in self.nova_client.flavors.list())
|
||||||
|
@ -41,24 +41,29 @@ cfg.CONF.register_opts([
|
|||||||
|
|
||||||
CLI_OPTIONS = [
|
CLI_OPTIONS = [
|
||||||
cfg.StrOpt('os-username',
|
cfg.StrOpt('os-username',
|
||||||
|
deprecated_group="DEFAULT",
|
||||||
default=os.environ.get('OS_USERNAME', 'ceilometer'),
|
default=os.environ.get('OS_USERNAME', 'ceilometer'),
|
||||||
help='Username to use for openstack service access'),
|
help='Username to use for openstack service access'),
|
||||||
cfg.StrOpt('os-password',
|
cfg.StrOpt('os-password',
|
||||||
|
deprecated_group="DEFAULT",
|
||||||
secret=True,
|
secret=True,
|
||||||
default=os.environ.get('OS_PASSWORD', 'admin'),
|
default=os.environ.get('OS_PASSWORD', 'admin'),
|
||||||
help='Password to use for openstack service access'),
|
help='Password to use for openstack service access'),
|
||||||
cfg.StrOpt('os-tenant-id',
|
cfg.StrOpt('os-tenant-id',
|
||||||
|
deprecated_group="DEFAULT",
|
||||||
default=os.environ.get('OS_TENANT_ID', ''),
|
default=os.environ.get('OS_TENANT_ID', ''),
|
||||||
help='Tenant ID to use for openstack service access'),
|
help='Tenant ID to use for openstack service access'),
|
||||||
cfg.StrOpt('os-tenant-name',
|
cfg.StrOpt('os-tenant-name',
|
||||||
|
deprecated_group="DEFAULT",
|
||||||
default=os.environ.get('OS_TENANT_NAME', 'admin'),
|
default=os.environ.get('OS_TENANT_NAME', 'admin'),
|
||||||
help='Tenant name to use for openstack service access'),
|
help='Tenant name to use for openstack service access'),
|
||||||
cfg.StrOpt('os-auth-url',
|
cfg.StrOpt('os-auth-url',
|
||||||
|
deprecated_group="DEFAULT",
|
||||||
default=os.environ.get('OS_AUTH_URL',
|
default=os.environ.get('OS_AUTH_URL',
|
||||||
'http://localhost:5000/v2.0'),
|
'http://localhost:5000/v2.0'),
|
||||||
help='Auth URL to use for openstack service access'),
|
help='Auth URL to use for openstack service access'),
|
||||||
]
|
]
|
||||||
cfg.CONF.register_cli_opts(CLI_OPTIONS)
|
cfg.CONF.register_cli_opts(CLI_OPTIONS, group="service_credentials")
|
||||||
|
|
||||||
|
|
||||||
def _sanitize_cmd_line(argv):
|
def _sanitize_cmd_line(argv):
|
||||||
|
@ -40,11 +40,6 @@ metering_topic metering the topic
|
|||||||
counter_source openstack The source name of emited counters
|
counter_source openstack The source name of emited counters
|
||||||
control_exchange ceilometer AMQP exchange to connect to if using RabbitMQ or Qpid
|
control_exchange ceilometer AMQP exchange to connect to if using RabbitMQ or Qpid
|
||||||
periodic_interval 600 seconds between running periodic tasks
|
periodic_interval 600 seconds between running periodic tasks
|
||||||
os_username ceilometer Username to use for openstack service access
|
|
||||||
os_password admin Password to use for openstack service access
|
|
||||||
os_tenant_id Tenant ID to use for openstack service access
|
|
||||||
os_tenant_name admin Tenant name to use for openstack service access
|
|
||||||
os_auth_url http://localhost:5000/v2.0 Auth URL to use for openstack service access
|
|
||||||
database_connection mongodb://localhost:27017/ceilometer Database connection string
|
database_connection mongodb://localhost:27017/ceilometer Database connection string
|
||||||
metering_api_port 8777 The port for the ceilometer API server
|
metering_api_port 8777 The port for the ceilometer API server
|
||||||
disabled_central_pollsters List of central pollsters to skip loading
|
disabled_central_pollsters List of central pollsters to skip loading
|
||||||
@ -53,6 +48,23 @@ disabled_notification_listeners List of n
|
|||||||
reseller_prefix AUTH\_ Prefix used by swift for reseller token
|
reseller_prefix AUTH\_ Prefix used by swift for reseller token
|
||||||
=============================== ==================================== ==============================================================
|
=============================== ==================================== ==============================================================
|
||||||
|
|
||||||
|
Service polling authentication
|
||||||
|
==============================
|
||||||
|
|
||||||
|
The following options must be placed into a [service_credentials] sections
|
||||||
|
and will be used by Ceilometer to retrieve information from OpenStack
|
||||||
|
components.
|
||||||
|
|
||||||
|
=============================== ==================================== ==============================================================
|
||||||
|
Parameter Default Note
|
||||||
|
=============================== ==================================== ==============================================================
|
||||||
|
os_username ceilometer Username to use for openstack service access
|
||||||
|
os_password admin Password to use for openstack service access
|
||||||
|
os_tenant_id Tenant ID to use for openstack service access
|
||||||
|
os_tenant_name admin Tenant name to use for openstack service access
|
||||||
|
os_auth_url http://localhost:5000/v2.0 Auth URL to use for openstack service access
|
||||||
|
=============================== ==================================== ==============================================================
|
||||||
|
|
||||||
Keystone Middleware Authentication
|
Keystone Middleware Authentication
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
@ -27,27 +27,6 @@
|
|||||||
#policy_default_rule=default
|
#policy_default_rule=default
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Options defined in ceilometer.service
|
|
||||||
#
|
|
||||||
|
|
||||||
# Username to use for openstack service access (string value)
|
|
||||||
#os_username=ceilometer
|
|
||||||
|
|
||||||
# Password to use for openstack service access (string value)
|
|
||||||
#os_password=admin
|
|
||||||
|
|
||||||
# Tenant ID to use for openstack service access (string value)
|
|
||||||
#os_tenant_id=
|
|
||||||
|
|
||||||
# Tenant name to use for openstack service access (string
|
|
||||||
# value)
|
|
||||||
#os_tenant_name=admin
|
|
||||||
|
|
||||||
# Auth URL to use for openstack service access (string value)
|
|
||||||
#os_auth_url=http://localhost:5000/v2.0
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options defined in ceilometer.api.app
|
# Options defined in ceilometer.api.app
|
||||||
#
|
#
|
||||||
@ -444,7 +423,7 @@
|
|||||||
# Name of this node. Must be a valid hostname, FQDN, or IP
|
# Name of this node. Must be a valid hostname, FQDN, or IP
|
||||||
# address. Must match "host" option, if running Nova. (string
|
# address. Must match "host" option, if running Nova. (string
|
||||||
# value)
|
# value)
|
||||||
#rpc_zmq_host=ceilometer
|
#rpc_zmq_host=dex
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -588,20 +567,27 @@
|
|||||||
#host=0.0.0.0
|
#host=0.0.0.0
|
||||||
|
|
||||||
|
|
||||||
[matchmaker_redis]
|
[service_credentials]
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options defined in ceilometer.openstack.common.rpc.matchmaker_redis
|
# Options defined in ceilometer.service
|
||||||
#
|
#
|
||||||
|
|
||||||
# Host to locate redis (string value)
|
# Username to use for openstack service access (string value)
|
||||||
#host=127.0.0.1
|
#os_username=ceilometer
|
||||||
|
|
||||||
# Use this port to connect to redis host. (integer value)
|
# Password to use for openstack service access (string value)
|
||||||
#port=6379
|
#os_password=admin
|
||||||
|
|
||||||
# Password for Redis server. (optional) (string value)
|
# Tenant ID to use for openstack service access (string value)
|
||||||
#password=<None>
|
#os_tenant_id=
|
||||||
|
|
||||||
|
# Tenant name to use for openstack service access (string
|
||||||
|
# value)
|
||||||
|
#os_tenant_name=admin
|
||||||
|
|
||||||
|
# Auth URL to use for openstack service access (string value)
|
||||||
|
#os_auth_url=http://localhost:5000/v2.0
|
||||||
|
|
||||||
|
|
||||||
[collector]
|
[collector]
|
||||||
@ -631,4 +617,20 @@
|
|||||||
#ringfile=/etc/oslo/matchmaker_ring.json
|
#ringfile=/etc/oslo/matchmaker_ring.json
|
||||||
|
|
||||||
|
|
||||||
|
[matchmaker_redis]
|
||||||
|
|
||||||
|
#
|
||||||
|
# Options defined in ceilometer.openstack.common.rpc.matchmaker_redis
|
||||||
|
#
|
||||||
|
|
||||||
|
# Host to locate redis (string value)
|
||||||
|
#host=127.0.0.1
|
||||||
|
|
||||||
|
# Use this port to connect to redis host. (integer value)
|
||||||
|
#port=6379
|
||||||
|
|
||||||
|
# Password for Redis server. (optional) (string value)
|
||||||
|
#password=<None>
|
||||||
|
|
||||||
|
|
||||||
# Total option count: 120
|
# Total option count: 120
|
||||||
|
Loading…
Reference in New Issue
Block a user