summaryrefslogtreecommitdiff
path: root/ironic/conf/neutron.py
blob: 0acfab5aa630b6a7993eb6b1c35bfe467456ce1e (plain)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
# Copyright 2016 Intel Corporation
# Copyright 2014 OpenStack Foundation
# All Rights Reserved
#
#    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.

from oslo_config import cfg

from ironic.common.i18n import _
from ironic.conf import auth

opts = [
    cfg.IntOpt('port_setup_delay',
               default=0,
               min=0,
               mutable=True,
               help=_('Delay value to wait for Neutron agents to setup '
                      'sufficient DHCP configuration for port.')),
    cfg.IntOpt('retries',
               default=3,
               mutable=True,
               deprecated_for_removal=True,
               deprecated_reason=_('Replaced by status_code_retries and '
                                   'status_code_retry_delay.'),
               help=_('DEPRECATED: Client retries in the case of a failed '
                      'request.')),
    cfg.StrOpt('cleaning_network',
               mutable=True,
               help=_('Neutron network UUID or name for the ramdisk to be '
                      'booted into for cleaning nodes. Required for "neutron" '
                      'network interface. It is also required if cleaning '
                      'nodes when using "flat" network interface or "neutron" '
                      'DHCP provider. If a name is provided, it must be '
                      'unique among all networks or cleaning will fail.'),
               deprecated_name='cleaning_network_uuid'),
    cfg.StrOpt('provisioning_network',
               mutable=True,
               help=_('Neutron network UUID or name for the ramdisk to be '
                      'booted into for provisioning nodes. Required for '
                      '"neutron" network interface. If a name is provided, '
                      'it must be unique among all networks or deploy will '
                      'fail.'),
               deprecated_name='provisioning_network_uuid'),
    cfg.ListOpt('provisioning_network_security_groups',
                default=[],
                mutable=True,
                help=_('List of Neutron Security Group UUIDs to be '
                       'applied during provisioning of the nodes. '
                       'Optional for the "neutron" network interface and not '
                       'used for the "flat" or "noop" network interfaces. '
                       'If not specified, default security group '
                       'is used.')),
    cfg.ListOpt('cleaning_network_security_groups',
                default=[],
                mutable=True,
                help=_('List of Neutron Security Group UUIDs to be '
                       'applied during cleaning of the nodes. '
                       'Optional for the "neutron" network interface and not '
                       'used for the "flat" or "noop" network interfaces. '
                       'If not specified, default security group '
                       'is used.')),
    cfg.StrOpt('rescuing_network',
               mutable=True,
               help=_('Neutron network UUID or name for booting the ramdisk '
                      'for rescue mode. This is not the network that the '
                      'rescue ramdisk will use post-boot -- the tenant '
                      'network is used for that. Required for "neutron" '
                      'network interface, if rescue mode will be used. It '
                      'is not used for the "flat" or "noop" network '
                      'interfaces. If a name is provided, it must be unique '
                      'among all networks or rescue will fail.')),
    cfg.ListOpt('rescuing_network_security_groups',
                default=[],
                mutable=True,
                help=_('List of Neutron Security Group UUIDs to be applied '
                       'during the node rescue process. Optional for the '
                       '"neutron" network interface and not used for the '
                       '"flat" or "noop" network interfaces. If not '
                       'specified, the default security group is used.')),
    cfg.IntOpt('request_timeout',
               default=45,
               mutable=True,
               help=_('Timeout for request processing when interacting '
                      'with Neutron. This value should be increased if '
                      'neutron port action timeouts are observed as neutron '
                      'performs pre-commit validation prior returning to '
                      'the API client which can take longer than normal '
                      'client/server interactions.')),
    cfg.BoolOpt('add_all_ports',
                default=False,
                mutable=True,
                help=_('Option to enable transmission of all ports '
                       'to neutron when creating ports for provisioning, '
                       'cleaning, or rescue. This is done without IP '
                       'addresses assigned to the port, and may be useful '
                       'in some bonded network configurations.')),
    cfg.StrOpt('inspection_network',
               mutable=True,
               help=_('Neutron network UUID or name for the ramdisk to be '
                      'booted into for in-band inspection of nodes. '
                      'If a name is provided, it must be unique among all '
                      'networks or inspection will fail.')),
    cfg.ListOpt('inspection_network_security_groups',
                default=[],
                mutable=True,
                help=_('List of Neutron Security Group UUIDs to be applied '
                       'during the node inspection process. Optional for the '
                       '"neutron" network interface and not used for the '
                       '"flat" or "noop" network interfaces. If not '
                       'specified, the default security group is used.')),
    cfg.IntOpt('dhcpv6_stateful_address_count',
               default=4,
               mutable=True,
               help=_('Number of IPv6 addresses to allocate for ports created '
                      'for provisioning, cleaning, rescue or inspection on '
                      'DHCPv6-stateful networks. Different stages of the '
                      'chain-loading process will request addresses with '
                      'different CLID/IAID. Due to non-identical identifiers '
                      'multiple addresses must be reserved for the host to '
                      'ensure each step of the boot process can successfully '
                      'lease addresses.'))
]


def register_opts(conf):
    conf.register_opts(opts, group='neutron')
    auth.register_auth_opts(conf, 'neutron', service_type='network')


def list_opts():
    return auth.add_auth_opts(opts, service_type='network')