mirror of
https://opendev.org/openstack/python-neutronclient.git
synced 2026-01-17 15:31:46 +00:00
Compare commits
40 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efa0ccb944 | ||
|
|
8f72d77812 | ||
|
|
a991ac87c7 | ||
|
|
01d0553ca4 | ||
|
|
66ccb4569d | ||
|
|
1aee34b246 | ||
|
|
01ffc4684a | ||
|
|
2f170ce6aa | ||
|
|
275924ecc8 | ||
|
|
5f7d102f0e | ||
|
|
905be917fe | ||
|
|
857b4b233c | ||
|
|
690bb97d9d | ||
|
|
7d998d2525 | ||
|
|
370bd215c7 | ||
|
|
dc026cd3d6 | ||
|
|
1d7a13ab11 | ||
|
|
636ac764d3 | ||
|
|
b2107dc867 | ||
|
|
75e112bc9b | ||
|
|
1befb3cd08 | ||
|
|
f882f1ddb6 | ||
|
|
8a2f07683b | ||
|
|
5438377b9c | ||
|
|
d36a8a4a17 | ||
|
|
a10390c62e | ||
|
|
cb9aae55c8 | ||
|
|
fb8de782bc | ||
|
|
2169b2bbab | ||
|
|
111713fd62 | ||
|
|
98d8d8b5cd | ||
|
|
1cdac483be | ||
|
|
fe515adf35 | ||
|
|
41e7ea6e29 | ||
|
|
863c6031fc | ||
|
|
750afa1777 | ||
|
|
4e48e90788 | ||
|
|
858b844cff | ||
|
|
2d93d2e1ed | ||
|
|
c28a5497c2 |
34 changed files with 247 additions and 71 deletions
|
|
@ -31,7 +31,6 @@
|
|||
- openstack/keystoneauth
|
||||
- openstack/neutron
|
||||
- openstack/neutron-lib
|
||||
- openstack/os-client-config
|
||||
- openstack/python-cinderclient
|
||||
- openstack/python-glanceclient
|
||||
- openstack/python-ironicclient
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@ Python bindings to the Neutron API
|
|||
This is a client library for Neutron built on the Neutron API. It
|
||||
provides a Python API (the ``neutronclient`` module).
|
||||
|
||||
.. note:: This project has been deprecated. The CLI code has been deleted
|
||||
and is not accessible anymore. The Python bindings are still in use by
|
||||
other projects but no new features will be added to this project.
|
||||
All projects under Openstack governance migrating to use OpenstackSDK.
|
||||
Any new feature should be proposed to OpenStack SDK and OpenStack
|
||||
Client.
|
||||
|
||||
* License: Apache License, Version 2.0
|
||||
* `PyPi`_ - package installation
|
||||
* `Online Documentation`_
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ def str2dict(strdict, required_keys=None, optional_keys=None):
|
|||
msg = _("missing value for key '%s'")
|
||||
raise argparse.ArgumentTypeError(msg % kv)
|
||||
else:
|
||||
kvlist[i-1] = "%s,%s" % (kvlist[i-1], kv)
|
||||
kvlist[i - 1] = "%s,%s" % (kvlist[i - 1], kv)
|
||||
for kv in kvlist:
|
||||
key, sep, value = kv.partition('=')
|
||||
if not sep:
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class RemovePeerFromSpeaker(neutronv20.NeutronCommand):
|
|||
neutron_client.remove_peer_from_bgp_speaker(_speaker_id,
|
||||
{'bgp_peer_id': _peer_id})
|
||||
print(_('Removed BGP peer %(peer)s from BGP speaker %(speaker)s.') %
|
||||
{'peer': parsed_args.bgp_peer,
|
||||
{'peer': parsed_args.bgp_peer,
|
||||
'speaker': parsed_args.bgp_speaker},
|
||||
file=self.app.stdout)
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ class FirewallPolicyInsertRule(command.Command):
|
|||
policy_id = client.find_firewall_policy(
|
||||
parsed_args.firewall_policy)['id']
|
||||
body = self.args2body(parsed_args)
|
||||
client.insert_rule_into_policy(policy_id, body)
|
||||
client.insert_rule_into_policy(policy_id, **body)
|
||||
rule_id = body['firewall_rule_id']
|
||||
policy = parsed_args.firewall_policy
|
||||
print((_('Inserted firewall rule %(rule)s in firewall policy '
|
||||
|
|
@ -264,7 +264,7 @@ class FirewallPolicyRemoveRule(command.Command):
|
|||
parsed_args.firewall_policy)['id']
|
||||
fwr_id = _get_required_firewall_rule(client, parsed_args)
|
||||
body = {'firewall_rule_id': fwr_id}
|
||||
client.remove_rule_from_policy(policy_id, body)
|
||||
client.remove_rule_from_policy(policy_id, **body)
|
||||
rule_id = body['firewall_rule_id']
|
||||
policy = parsed_args.firewall_policy
|
||||
print((_('Removed firewall rule %(rule)s from firewall policy '
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ class CreateBgpvpnResAssoc(command.ShowOne):
|
|||
body.update(
|
||||
arg2body(bgpvpn['id'], parsed_args))
|
||||
|
||||
if self._assoc_res_name == constants.NETWORK_ASSOC:
|
||||
if self._resource == constants.NETWORK_ASSOC:
|
||||
obj = client.create_bgpvpn_network_association(
|
||||
bgpvpn['id'], **body)
|
||||
elif self._assoc_res_name == constants.PORT_ASSOCS:
|
||||
elif self._resource == constants.PORT_ASSOC:
|
||||
obj = client.create_bgpvpn_port_association(bgpvpn['id'], **body)
|
||||
else:
|
||||
obj = client.create_bgpvpn_router_association(
|
||||
|
|
@ -123,10 +123,10 @@ class SetBgpvpnResAssoc(command.Command):
|
|||
arg2body = getattr(self, '_args2body', None)
|
||||
if callable(arg2body):
|
||||
body = arg2body(bgpvpn['id'], parsed_args)
|
||||
if self._assoc_res_name == constants.NETWORK_ASSOC:
|
||||
if self._resource == constants.NETWORK_ASSOC:
|
||||
client.update_bgpvpn_network_association(
|
||||
bgpvpn['id'], parsed_args.resource_association_id, **body)
|
||||
elif self._assoc_res_name == constants.PORT_ASSOCS:
|
||||
elif self._resource == constants.PORT_ASSOC:
|
||||
client.update_bgpvpn_port_association(
|
||||
bgpvpn['id'], parsed_args.resource_association_id, **body)
|
||||
else:
|
||||
|
|
@ -165,9 +165,9 @@ class DeleteBgpvpnResAssoc(command.Command):
|
|||
fails = 0
|
||||
for id in parsed_args.resource_association_ids:
|
||||
try:
|
||||
if self._assoc_res_name == constants.NETWORK_ASSOC:
|
||||
if self._resource == constants.NETWORK_ASSOC:
|
||||
client.delete_bgpvpn_network_association(bgpvpn['id'], id)
|
||||
elif self._assoc_res_name == constants.PORT_ASSOCS:
|
||||
elif self._resource == constants.PORT_ASSOC:
|
||||
client.delete_bgpvpn_port_association(bgpvpn['id'], id)
|
||||
else:
|
||||
client.delete_bgpvpn_router_association(bgpvpn['id'], id)
|
||||
|
|
@ -221,10 +221,10 @@ class ListBgpvpnResAssoc(command.Lister):
|
|||
params = {}
|
||||
if parsed_args.property:
|
||||
params.update(parsed_args.property)
|
||||
if self._assoc_res_name == constants.NETWORK_ASSOC:
|
||||
if self._resource == constants.NETWORK_ASSOC:
|
||||
objs = client.bgpvpn_network_associations(
|
||||
bgpvpn['id'], retrieve_all=True, **params)
|
||||
elif self._assoc_res_name == constants.PORT_ASSOCS:
|
||||
elif self._resource == constants.PORT_ASSOC:
|
||||
objs = client.bgpvpn_port_associations(
|
||||
bgpvpn['id'], retrieve_all=True, **params)
|
||||
else:
|
||||
|
|
@ -265,10 +265,10 @@ class ShowBgpvpnResAssoc(command.ShowOne):
|
|||
def take_action(self, parsed_args):
|
||||
client = self.app.client_manager.network
|
||||
bgpvpn = client.find_bgpvpn(parsed_args.bgpvpn)
|
||||
if self._assoc_res_name == constants.NETWORK_ASSOC:
|
||||
if self._resource == constants.NETWORK_ASSOC:
|
||||
obj = client.get_bgpvpn_network_association(
|
||||
bgpvpn['id'], parsed_args.resource_association_id)
|
||||
elif self._assoc_res_name == constants.PORT_ASSOCS:
|
||||
elif self._resource == constants.PORT_ASSOC:
|
||||
obj = client.get_bgpvpn_port_association(
|
||||
bgpvpn['id'], parsed_args.resource_association_id)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ _attr_map = (
|
|||
('port_pair_group_parameters', 'Port Pair Group Parameters',
|
||||
column_util.LIST_BOTH),
|
||||
('description', 'Description', column_util.LIST_LONG_ONLY),
|
||||
('project_id', 'Project', column_util.LIST_LONG_ONLY),
|
||||
('project_id', 'Project', column_util.LIST_LONG_ONLY),
|
||||
('is_tap_enabled', 'Tap Enabled', column_util.LIST_BOTH)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -213,8 +213,8 @@ def _validate_destination_chains(comma_split, attrs, client, sc_):
|
|||
dc_ = client.find_sfc_port_chain(e, ignore_missing=False)['id']
|
||||
attrs['port_chains'][sc_].append(dc_)
|
||||
if _check_cycle(attrs['port_chains'], sc_, dc_):
|
||||
raise(exceptions.CommandError(
|
||||
"Error: Service graph contains a cycle"))
|
||||
raise exceptions.CommandError(
|
||||
"Error: Service graph contains a cycle")
|
||||
else:
|
||||
raise exceptions.CommandError(
|
||||
"Error: you must specify at least one "
|
||||
|
|
|
|||
|
|
@ -56,6 +56,66 @@ _attr_map_dict = {
|
|||
'project_id': 'Project',
|
||||
}
|
||||
|
||||
_auth_algorithms = [
|
||||
'sha1',
|
||||
'sha256',
|
||||
'sha384',
|
||||
'sha512',
|
||||
'aes-xcbc',
|
||||
'aes-cmac',
|
||||
]
|
||||
|
||||
_encryption_algorithms = [
|
||||
'3des',
|
||||
'aes-128',
|
||||
'aes-192',
|
||||
'aes-256',
|
||||
'aes-128-ccm-8',
|
||||
'aes-192-ccm-8',
|
||||
'aes-256-ccm-8',
|
||||
'aes-128-ccm-12',
|
||||
'aes-192-ccm-12',
|
||||
'aes-256-ccm-12',
|
||||
'aes-128-ccm-16',
|
||||
'aes-192-ccm-16',
|
||||
'aes-256-ccm-16',
|
||||
'aes-128-gcm-8',
|
||||
'aes-192-gcm-8',
|
||||
'aes-256-gcm-8',
|
||||
'aes-128-gcm-12',
|
||||
'aes-192-gcm-12',
|
||||
'aes-256-gcm-12',
|
||||
'aes-128-gcm-16',
|
||||
'aes-192-gcm-16',
|
||||
'aes-256-gcm-16',
|
||||
'aes-128-ctr',
|
||||
'aes-192-ctr',
|
||||
'aes-256-ctr',
|
||||
]
|
||||
|
||||
_pfs_groups = [
|
||||
'group2',
|
||||
'group5',
|
||||
'group14',
|
||||
'group15',
|
||||
'group16',
|
||||
'group17',
|
||||
'group18',
|
||||
'group19',
|
||||
'group20',
|
||||
'group21',
|
||||
'group22',
|
||||
'group23',
|
||||
'group24',
|
||||
'group25',
|
||||
'group26',
|
||||
'group27',
|
||||
'group28',
|
||||
'group29',
|
||||
'group30',
|
||||
'group31',
|
||||
]
|
||||
|
||||
|
||||
def _convert_to_lowercase(string):
|
||||
return string.lower()
|
||||
|
|
@ -68,12 +128,12 @@ def _get_common_parser(parser):
|
|||
help=_('Description of the IKE policy'))
|
||||
parser.add_argument(
|
||||
'--auth-algorithm',
|
||||
choices=['sha1', 'sha256', 'sha384', 'sha512'],
|
||||
choices=_auth_algorithms,
|
||||
type=_convert_to_lowercase,
|
||||
help=_('Authentication algorithm'))
|
||||
parser.add_argument(
|
||||
'--encryption-algorithm',
|
||||
choices=['aes-128', '3des', 'aes-192', 'aes-256'],
|
||||
choices=_encryption_algorithms,
|
||||
type=_convert_to_lowercase,
|
||||
help=_('Encryption algorithm'))
|
||||
parser.add_argument(
|
||||
|
|
@ -88,7 +148,7 @@ def _get_common_parser(parser):
|
|||
help=_('IKE version for the policy'))
|
||||
parser.add_argument(
|
||||
'--pfs',
|
||||
choices=['group5', 'group2', 'group14'],
|
||||
choices=_pfs_groups,
|
||||
type=_convert_to_lowercase,
|
||||
help=_('Perfect Forward Secrecy'))
|
||||
parser.add_argument(
|
||||
|
|
|
|||
|
|
@ -54,6 +54,66 @@ _attr_map_dict = {
|
|||
'project_id': 'Project',
|
||||
}
|
||||
|
||||
_auth_algorithms = [
|
||||
'sha1',
|
||||
'sha256',
|
||||
'sha384',
|
||||
'sha512',
|
||||
'aes-xcbc',
|
||||
'aes-cmac',
|
||||
]
|
||||
|
||||
_encryption_algorithms = [
|
||||
'3des',
|
||||
'aes-128',
|
||||
'aes-192',
|
||||
'aes-256',
|
||||
'aes-128-ccm-8',
|
||||
'aes-192-ccm-8',
|
||||
'aes-256-ccm-8',
|
||||
'aes-128-ccm-12',
|
||||
'aes-192-ccm-12',
|
||||
'aes-256-ccm-12',
|
||||
'aes-128-ccm-16',
|
||||
'aes-192-ccm-16',
|
||||
'aes-256-ccm-16',
|
||||
'aes-128-gcm-8',
|
||||
'aes-192-gcm-8',
|
||||
'aes-256-gcm-8',
|
||||
'aes-128-gcm-12',
|
||||
'aes-192-gcm-12',
|
||||
'aes-256-gcm-12',
|
||||
'aes-128-gcm-16',
|
||||
'aes-192-gcm-16',
|
||||
'aes-256-gcm-16',
|
||||
'aes-128-ctr',
|
||||
'aes-192-ctr',
|
||||
'aes-256-ctr',
|
||||
]
|
||||
|
||||
_pfs_groups = [
|
||||
'group2',
|
||||
'group5',
|
||||
'group14',
|
||||
'group15',
|
||||
'group16',
|
||||
'group17',
|
||||
'group18',
|
||||
'group19',
|
||||
'group20',
|
||||
'group21',
|
||||
'group22',
|
||||
'group23',
|
||||
'group24',
|
||||
'group25',
|
||||
'group26',
|
||||
'group27',
|
||||
'group28',
|
||||
'group29',
|
||||
'group30',
|
||||
'group31',
|
||||
]
|
||||
|
||||
|
||||
def _convert_to_lowercase(string):
|
||||
return string.lower()
|
||||
|
|
@ -66,7 +126,7 @@ def _get_common_parser(parser):
|
|||
help=_('Description of the IPsec policy'))
|
||||
parser.add_argument(
|
||||
'--auth-algorithm',
|
||||
choices=['sha1', 'sha256', 'sha384', 'sha512'],
|
||||
choices=_auth_algorithms,
|
||||
type=_convert_to_lowercase,
|
||||
help=_('Authentication algorithm for IPsec policy'))
|
||||
parser.add_argument(
|
||||
|
|
@ -76,7 +136,7 @@ def _get_common_parser(parser):
|
|||
help=_('Encapsulation mode for IPsec policy'))
|
||||
parser.add_argument(
|
||||
'--encryption-algorithm',
|
||||
choices=['3des', 'aes-128', 'aes-192', 'aes-256'],
|
||||
choices=_encryption_algorithms,
|
||||
type=_convert_to_lowercase,
|
||||
help=_('Encryption algorithm for IPsec policy'))
|
||||
parser.add_argument(
|
||||
|
|
@ -86,7 +146,7 @@ def _get_common_parser(parser):
|
|||
help=vpn_utils.lifetime_help("IPsec"))
|
||||
parser.add_argument(
|
||||
'--pfs',
|
||||
choices=['group2', 'group5', 'group14'],
|
||||
choices=_pfs_groups,
|
||||
type=_convert_to_lowercase,
|
||||
help=_('Perfect Forward Secrecy for IPsec policy'))
|
||||
parser.add_argument(
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ _attr_map = (
|
|||
('status', 'Status', column_util.LIST_BOTH),
|
||||
('description', 'Description', column_util.LIST_LONG_ONLY),
|
||||
('project_id', 'Project', column_util.LIST_LONG_ONLY),
|
||||
('external_v4_ip', 'Ext v4 IP', column_util.LIST_LONG_ONLY),
|
||||
('external_v6_ip', 'Ext v6 IP', column_util.LIST_LONG_ONLY),
|
||||
)
|
||||
|
||||
_attr_map_dict = {
|
||||
|
|
@ -48,6 +50,8 @@ _attr_map_dict = {
|
|||
'status': 'Status',
|
||||
'description': 'Description',
|
||||
'project_id': 'Project',
|
||||
'external_v4_ip': 'Ext v4 IP',
|
||||
'external_v6_ip': 'Ext v6 IP',
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -135,8 +139,7 @@ class CreateVPNService(command.ShowOne):
|
|||
attrs['router_id'] = _router_id
|
||||
obj = client.create_vpn_service(**attrs)
|
||||
display_columns, columns = utils.get_osc_show_columns_for_sdk_resource(
|
||||
obj, _attr_map_dict, ['location', 'tenant_id', 'external_v4_ip',
|
||||
'external_v6_ip'])
|
||||
obj, _attr_map_dict, ['location', 'tenant_id'])
|
||||
data = utils.get_dict_properties(obj, columns)
|
||||
return display_columns, data
|
||||
|
||||
|
|
@ -244,7 +247,6 @@ class ShowVPNService(command.ShowOne):
|
|||
ignore_missing=False)['id']
|
||||
obj = client.get_vpn_service(vpn_id)
|
||||
display_columns, columns = utils.get_osc_show_columns_for_sdk_resource(
|
||||
obj, _attr_map_dict, ['location', 'tenant_id', 'external_v4_ip',
|
||||
'external_v6_ip'])
|
||||
obj, _attr_map_dict, ['location', 'tenant_id'])
|
||||
data = utils.get_dict_properties(obj, columns)
|
||||
return (display_columns, data)
|
||||
|
|
|
|||
|
|
@ -507,12 +507,12 @@ class TestFirewallPolicyInsertRule(TestFirewallPolicy):
|
|||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
result = self.cmd.take_action(parsed_args)
|
||||
|
||||
self.mocked.assert_called_once_with(
|
||||
target, {
|
||||
'firewall_rule_id': rule,
|
||||
'insert_before': before,
|
||||
'insert_after': after
|
||||
})
|
||||
body = {
|
||||
'firewall_rule_id': rule,
|
||||
'insert_before': before,
|
||||
'insert_after': after
|
||||
}
|
||||
self.mocked.assert_called_once_with(target, **body)
|
||||
self.assertIsNone(result)
|
||||
self.assertEqual(1, self.networkclient.find_firewall_policy.call_count)
|
||||
self.assertEqual(3, self.networkclient.find_firewall_rule.call_count)
|
||||
|
|
@ -560,8 +560,8 @@ class TestFirewallPolicyRemoveRule(TestFirewallPolicy):
|
|||
]
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
result = self.cmd.take_action(parsed_args)
|
||||
self.mocked.assert_called_once_with(
|
||||
target, {'firewall_rule_id': rule})
|
||||
body = {'firewall_rule_id': rule}
|
||||
self.mocked.assert_called_once_with(target, **body)
|
||||
self.assertIsNone(result)
|
||||
self.assertEqual(1, self.networkclient.find_firewall_policy.call_count)
|
||||
self.assertEqual(1, self.networkclient.find_firewall_rule.call_count)
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class TestCreateSfcFlowClassifier(fakes.TestNeutronClientOSCV2):
|
|||
'logical_destination_port':
|
||||
self._fc['logical_destination_port'],
|
||||
'l7_parameters': param
|
||||
}
|
||||
}
|
||||
)
|
||||
self.assertEqual(self.columns, columns)
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class TestCreateSfcPortChain(fakes.TestNeutronClientOSCV2):
|
|||
self._port_chain['name'],
|
||||
self._port_chain['port_pair_groups'],
|
||||
self._port_chain['project_id'],
|
||||
)
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
super(TestCreateSfcPortChain, self).setUp()
|
||||
|
|
@ -357,7 +357,7 @@ class TestSetSfcPortChain(fakes.TestNeutronClientOSCV2):
|
|||
arglist = [
|
||||
target,
|
||||
'--no-port-pair-group',
|
||||
]
|
||||
]
|
||||
verifylist = [
|
||||
(self.res, target),
|
||||
('no_port_pair_group', True),
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ class TestCreateSfcServiceGraph(fakes.TestNeutronClientOSCV2):
|
|||
|
||||
arglist = [
|
||||
"--description", self._service_graph['description'],
|
||||
"--branching-point", bp1_str,
|
||||
"--branching-point", bp2_str,
|
||||
"--branching-point", bp1_str,
|
||||
"--branching-point", bp2_str,
|
||||
self._service_graph['name']]
|
||||
|
||||
pcs = {'pc1': ['pc2', 'pc3'], 'pc2': ['pc4']}
|
||||
|
|
@ -154,8 +154,8 @@ class TestCreateSfcServiceGraph(fakes.TestNeutronClientOSCV2):
|
|||
|
||||
arglist = [
|
||||
"--description", self._service_graph['description'],
|
||||
"--branching-point", bp1_str,
|
||||
"--branching-point", bp2_str,
|
||||
"--branching-point", bp1_str,
|
||||
"--branching-point", bp2_str,
|
||||
self._service_graph['name']]
|
||||
|
||||
verifylist = [
|
||||
|
|
@ -175,7 +175,7 @@ class TestCreateSfcServiceGraph(fakes.TestNeutronClientOSCV2):
|
|||
|
||||
arglist = [
|
||||
"--description", self._service_graph['description'],
|
||||
"--branching-point", bp1_str,
|
||||
"--branching-point", bp1_str,
|
||||
self._service_graph['name']]
|
||||
|
||||
verifylist = [
|
||||
|
|
@ -196,8 +196,8 @@ class TestCreateSfcServiceGraph(fakes.TestNeutronClientOSCV2):
|
|||
|
||||
arglist = [
|
||||
"--description", self._service_graph['description'],
|
||||
"--branching-point", bp1_str,
|
||||
"--branching-point", bp2_str,
|
||||
"--branching-point", bp1_str,
|
||||
"--branching-point", bp2_str,
|
||||
self._service_graph['name']]
|
||||
|
||||
verifylist = [
|
||||
|
|
|
|||
|
|
@ -125,6 +125,8 @@ class VPNService(FakeVPNaaS):
|
|||
('status', 'ACTIVE'),
|
||||
('description', 'my-desc-' + uuid.uuid4().hex),
|
||||
('project_id', 'project-id-' + uuid.uuid4().hex),
|
||||
('external_v4_ip', '192.0.2.42'),
|
||||
('external_v6_ip', '2001:0db8:207a:4a3a:053b:6fab:7df9:1afd'),
|
||||
))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -106,10 +106,14 @@ class TestVPNService(test_fakes.TestNeutronClientOSCV2):
|
|||
'Status',
|
||||
'Description',
|
||||
'Project',
|
||||
'Ext v4 IP',
|
||||
'Ext v6 IP',
|
||||
)
|
||||
self.data = _generate_data()
|
||||
self.ordered_headers = (
|
||||
'Description',
|
||||
'Ext v4 IP',
|
||||
'Ext v6 IP',
|
||||
'Flavor',
|
||||
'ID',
|
||||
'Name',
|
||||
|
|
@ -121,6 +125,8 @@ class TestVPNService(test_fakes.TestNeutronClientOSCV2):
|
|||
)
|
||||
self.ordered_data = (
|
||||
_vpnservice['description'],
|
||||
_vpnservice['external_v4_ip'],
|
||||
_vpnservice['external_v6_ip'],
|
||||
_vpnservice['flavor_id'],
|
||||
_vpnservice['id'],
|
||||
_vpnservice['name'],
|
||||
|
|
@ -132,6 +138,8 @@ class TestVPNService(test_fakes.TestNeutronClientOSCV2):
|
|||
)
|
||||
self.ordered_columns = (
|
||||
'description',
|
||||
'external_v4_ip',
|
||||
'external_v6_ip',
|
||||
'flavor_id',
|
||||
'id',
|
||||
'name',
|
||||
|
|
|
|||
|
|
@ -250,6 +250,9 @@ class ClientBase(object):
|
|||
def __init__(self, **kwargs):
|
||||
"""Initialize a new client for the Neutron v2.0 API."""
|
||||
super(ClientBase, self).__init__()
|
||||
_logger.warning("The python binding code in neutronclient is "
|
||||
"deprecated in favor of OpenstackSDK, please use "
|
||||
"that as this will be removed in a future release.")
|
||||
self.retries = kwargs.pop('retries', 0)
|
||||
self.raise_errors = kwargs.pop('raise_errors', True)
|
||||
self.httpclient = client.construct_http_client(**kwargs)
|
||||
|
|
@ -847,7 +850,7 @@ class Client(ClientBase):
|
|||
|
||||
def list_port_bindings(self, port_id, retrieve_all=True, **_params):
|
||||
"""Fetches a list of all bindings for a certain port."""
|
||||
return self.list('port_bindings', self.port_bindings_path % port_id,
|
||||
return self.list('bindings', self.port_bindings_path % port_id,
|
||||
retrieve_all, **_params)
|
||||
|
||||
def activate_port_binding(self, port_id, host_id):
|
||||
|
|
|
|||
5
releasenotes/notes/remove-py38-26a1befde3f44b82.yaml
Normal file
5
releasenotes/notes/remove-py38-26a1befde3f44b82.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Python 3.8 support was dropped. The minimum version of Python now supported
|
||||
is Python 3.9.
|
||||
|
|
@ -3,4 +3,4 @@
|
|||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/2023.1
|
||||
:branch: unmaintained/2023.1
|
||||
|
|
|
|||
6
releasenotes/source/2024.1.rst
Normal file
6
releasenotes/source/2024.1.rst
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
===========================
|
||||
2024.1 Series Release Notes
|
||||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: unmaintained/2024.1
|
||||
6
releasenotes/source/2024.2.rst
Normal file
6
releasenotes/source/2024.2.rst
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
===========================
|
||||
2024.2 Series Release Notes
|
||||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/2024.2
|
||||
6
releasenotes/source/2025.1.rst
Normal file
6
releasenotes/source/2025.1.rst
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
===========================
|
||||
2025.1 Series Release Notes
|
||||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/2025.1
|
||||
6
releasenotes/source/2025.2.rst
Normal file
6
releasenotes/source/2025.2.rst
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
===========================
|
||||
2025.2 Series Release Notes
|
||||
===========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/2025.2
|
||||
|
|
@ -6,6 +6,10 @@
|
|||
:maxdepth: 1
|
||||
|
||||
unreleased
|
||||
2025.2
|
||||
2025.1
|
||||
2024.2
|
||||
2024.1
|
||||
2023.2
|
||||
2023.1
|
||||
zed
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ Victoria Series Release Notes
|
|||
=============================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/victoria
|
||||
:branch: unmaintained/victoria
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ Wallaby Series Release Notes
|
|||
============================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/wallaby
|
||||
:branch: unmaintained/wallaby
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ Xena Series Release Notes
|
|||
=========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/xena
|
||||
:branch: unmaintained/xena
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ Yoga Series Release Notes
|
|||
=========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/yoga
|
||||
:branch: unmaintained/yoga
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ Zed Series Release Notes
|
|||
========================
|
||||
|
||||
.. release-notes::
|
||||
:branch: stable/zed
|
||||
:branch: unmaintained/zed
|
||||
|
|
|
|||
|
|
@ -1,14 +1,9 @@
|
|||
# Requirements lower bounds listed here are our best effort to keep them up to
|
||||
# date but we do not test them so no guarantee of having them all correct. If
|
||||
# you find any incorrect lower bounds, let us know or propose a fix.
|
||||
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
cliff>=3.4.0 # Apache-2.0
|
||||
debtcollector>=1.2.0 # Apache-2.0
|
||||
iso8601>=0.1.11 # MIT
|
||||
netaddr>=0.7.18 # BSD
|
||||
openstacksdk>=1.5.0 # Apache-2.0
|
||||
osc-lib>=1.12.0 # Apache-2.0
|
||||
|
|
@ -16,7 +11,6 @@ oslo.i18n>=3.15.3 # Apache-2.0
|
|||
oslo.log>=3.36.0 # Apache-2.0
|
||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
||||
oslo.utils>=3.33.0 # Apache-2.0
|
||||
os-client-config>=1.28.0 # Apache-2.0
|
||||
keystoneauth1>=3.8.0 # Apache-2.0
|
||||
# keystoneclient is used only by neutronclient.osc.utils
|
||||
# TODO(amotoki): Drop this after osc.utils has no dependency on keystoneclient
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ description_file =
|
|||
author = OpenStack Networking Project
|
||||
author_email = openstack-discuss@lists.openstack.org
|
||||
home_page = https://docs.openstack.org/python-neutronclient/latest/
|
||||
python_requires = >=3.8
|
||||
python_requires = >=3.9
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Developers
|
||||
|
|
@ -18,8 +18,10 @@ classifier =
|
|||
Programming Language :: Python :: Implementation :: CPython
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
|
||||
[files]
|
||||
packages =
|
||||
|
|
|
|||
|
|
@ -1,18 +1,12 @@
|
|||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
||||
hacking>=6.1.0,<6.2.0 # Apache-2.0
|
||||
|
||||
bandit!=1.6.0,>=1.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
flake8-import-order==0.12 # LGPLv3
|
||||
flake8-import-order>=0.18.0,<0.19.0 # LGPLv3
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
osprofiler>=2.3.0 # Apache-2.0
|
||||
python-openstackclient>=3.12.0 # Apache-2.0
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
requests-mock>=1.2.0 # Apache-2.0
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
testtools>=2.2.0 # MIT
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
tempest>=17.1.0 # Apache-2.0
|
||||
|
|
|
|||
16
tox.ini
16
tox.ini
|
|
@ -51,7 +51,6 @@ deps =
|
|||
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pdf-docs]
|
||||
envdir = {toxworkdir}/docs
|
||||
deps = {[testenv:docs]deps}
|
||||
allowlist_externals =
|
||||
make
|
||||
|
|
@ -66,12 +65,25 @@ deps =
|
|||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[flake8]
|
||||
# E126 continuation line over-indented for hanging indent
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# H405 multi line docstring summary not separated with an empty line
|
||||
# I202 Additional newline in a group of imports
|
||||
# N530 direct neutron imports not allowed
|
||||
# TODO(amotoki) check the following new rules should be fixed or ignored
|
||||
# E731 do not assign a lambda expression, use a def
|
||||
# W504 line break after binary operator
|
||||
ignore = E126,E128,E731,I202,H405,N530,W504
|
||||
show-source = true
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
|
||||
import-order-style = pep8
|
||||
|
||||
# H106: Don't put vim configuration in source files
|
||||
# H203: Use assertIs(Not)None to check for None
|
||||
# H204: Use assert(Not)Equal to check for equality
|
||||
# H205: Use assert(Greater|Less)(Equal) for comparison
|
||||
# H904: Delay string interpolations at logging calls
|
||||
enable-extensions=H904
|
||||
enable-extensions=H106,H203,H204,H205,H904
|
||||
|
||||
[testenv:bandit]
|
||||
# B303: blacklist calls: md5, sha1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue