/usr/lib/python2.7/dist-packages/os_faults/drivers/cloud/devstack_systemd.py is in python-os-faults 0.1.17-0ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain 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.
import logging
from os_faults.drivers.cloud import devstack
LOG = logging.getLogger(__name__)
class DevStackSystemdManagement(devstack.DevStackManagement):
"""Driver for modern DevStack based on Systemd.
This driver requires DevStack installed with Systemd (USE_SCREEN=False).
Supports discovering of node MAC addresses.
**Example configuration:**
.. code-block:: yaml
cloud_management:
driver: devstack_systemd
args:
address: 192.168.1.10
username: ubuntu
password: ubuntu_pass
private_key_file: ~/.ssh/id_rsa_devstack_systemd
slaves:
- 192.168.1.11
- 192.168.1.12
iface: eth1
parameters:
- **address** - ip address of any devstack node
- **username** - username for all nodes
- **password** - password for all nodes (optional)
- **private_key_file** - path to key file (optional)
- **slaves** - list of ips for additional nodes (optional)
- **iface** - network interface name to retrieve mac address (optional)
- **serial** - how many hosts Ansible should manage at a single time.
(optional) default: 10
"""
NAME = 'devstack_systemd'
DESCRIPTION = 'DevStack management driver using Systemd'
# NODE_CLS = DevStackNode
SERVICES = {
'keystone': {
'driver': 'systemd_service',
'args': {
'grep': 'keystone-uwsgi',
'systemd_service': 'devstack@keystone',
}
},
'mysql': {
'driver': 'systemd_service',
'args': {
'grep': 'mysqld',
'systemd_service': 'mariadb',
'port': ['tcp', 3307],
}
},
'rabbitmq': {
'driver': 'systemd_service',
'args': {
'grep': 'rabbitmq_server',
'systemd_service': 'rabbitmq-server',
}
},
'nova-api': {
'driver': 'systemd_service',
'args': {
'grep': 'nova-api',
'systemd_service': 'devstack@n-api',
}
},
'glance-api': {
'driver': 'systemd_service',
'args': {
'grep': 'glance-api',
'systemd_service': 'devstack@g-api',
}
},
'nova-compute': {
'driver': 'systemd_service',
'args': {
'grep': 'nova-compute',
'systemd_service': 'devstack@n-cpu',
}
},
'nova-scheduler': {
'driver': 'systemd_service',
'args': {
'grep': 'nova-scheduler',
'systemd_service': 'devstack@n-sch',
}
},
}
SUPPORTED_NETWORKS = ['all-in-one']
CONFIG_SCHEMA = {
'type': 'object',
'$schema': 'http://json-schema.org/draft-04/schema#',
'properties': {
'address': {'type': 'string'},
'username': {'type': 'string'},
'password': {'type': 'string'},
'private_key_file': {'type': 'string'},
'slaves': {
'type': 'array',
'items': {'type': 'string'},
},
'iface': {'type': 'string'},
'serial': {'type': 'integer', 'minimum': 1},
},
'required': ['address', 'username'],
'additionalProperties': False,
}
|