python-neutronclient 12.0.0__py3-none-any.whl → 14.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {python_neutronclient-12.0.0.dist-info → python_neutronclient-14.0.0.dist-info}/METADATA +1 -1
  2. {python_neutronclient-12.0.0.dist-info → python_neutronclient-14.0.0.dist-info}/RECORD +8 -33
  3. {python_neutronclient-12.0.0.dist-info → python_neutronclient-14.0.0.dist-info}/WHEEL +1 -1
  4. python_neutronclient-14.0.0.dist-info/entry_points.txt +38 -0
  5. python_neutronclient-14.0.0.dist-info/pbr.json +1 -0
  6. neutronclient/osc/v2/dynamic_routing/__init__.py +0 -0
  7. neutronclient/osc/v2/dynamic_routing/bgp_dragent.py +0 -112
  8. neutronclient/osc/v2/dynamic_routing/bgp_peer.py +0 -181
  9. neutronclient/osc/v2/dynamic_routing/bgp_speaker.py +0 -305
  10. neutronclient/osc/v2/dynamic_routing/constants.py +0 -18
  11. neutronclient/osc/v2/vpnaas/__init__.py +0 -0
  12. neutronclient/osc/v2/vpnaas/endpoint_group.py +0 -222
  13. neutronclient/osc/v2/vpnaas/ikepolicy.py +0 -318
  14. neutronclient/osc/v2/vpnaas/ipsec_site_connection.py +0 -385
  15. neutronclient/osc/v2/vpnaas/ipsecpolicy.py +0 -318
  16. neutronclient/osc/v2/vpnaas/utils.py +0 -112
  17. neutronclient/osc/v2/vpnaas/vpnservice.py +0 -252
  18. neutronclient/tests/unit/osc/v2/dynamic_routing/__init__.py +0 -0
  19. neutronclient/tests/unit/osc/v2/dynamic_routing/fakes.py +0 -145
  20. neutronclient/tests/unit/osc/v2/dynamic_routing/test_bgp_dragent.py +0 -84
  21. neutronclient/tests/unit/osc/v2/dynamic_routing/test_bgp_peer.py +0 -150
  22. neutronclient/tests/unit/osc/v2/dynamic_routing/test_bgp_speaker.py +0 -157
  23. neutronclient/tests/unit/osc/v2/vpnaas/__init__.py +0 -0
  24. neutronclient/tests/unit/osc/v2/vpnaas/common.py +0 -183
  25. neutronclient/tests/unit/osc/v2/vpnaas/fakes.py +0 -191
  26. neutronclient/tests/unit/osc/v2/vpnaas/test_endpoint_group.py +0 -254
  27. neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py +0 -319
  28. neutronclient/tests/unit/osc/v2/vpnaas/test_ipsec_site_connection.py +0 -372
  29. neutronclient/tests/unit/osc/v2/vpnaas/test_ipsecpolicy.py +0 -299
  30. neutronclient/tests/unit/osc/v2/vpnaas/test_vpnservice.py +0 -305
  31. python_neutronclient-12.0.0.dist-info/entry_points.txt +0 -81
  32. python_neutronclient-12.0.0.dist-info/pbr.json +0 -1
  33. {python_neutronclient-12.0.0.dist-info → python_neutronclient-14.0.0.dist-info}/licenses/AUTHORS +0 -0
  34. {python_neutronclient-12.0.0.dist-info → python_neutronclient-14.0.0.dist-info}/licenses/LICENSE +0 -0
  35. {python_neutronclient-12.0.0.dist-info → python_neutronclient-14.0.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-neutronclient
3
- Version: 12.0.0
3
+ Version: 14.0.0
4
4
  Summary: CLI and Client Library for OpenStack Networking
5
5
  Home-page: https://docs.openstack.org/python-neutronclient/latest/
6
6
  Author: OpenStack Networking Project
@@ -78,11 +78,6 @@ neutronclient/osc/plugin.py,sha256=w6LxS78C7L1AZ9J-cGYs3LLN7CDQJWTnOm5-8zlIIes,2
78
78
  neutronclient/osc/utils.py,sha256=6lQsswTCMaSPNpXyr94knT95A4VdFvX1vcj5nMbJ4jg,4649
79
79
  neutronclient/osc/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  neutronclient/osc/v2/utils.py,sha256=oCfrxLDlmn-ZlvtYEeRVwH12B2IDyl_1ECRLol1VRSQ,888
81
- neutronclient/osc/v2/dynamic_routing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- neutronclient/osc/v2/dynamic_routing/bgp_dragent.py,sha256=WZjRUgkk9THjSiRzl53drKW9faMX_u8Xh2cVvIx6G70,3743
83
- neutronclient/osc/v2/dynamic_routing/bgp_peer.py,sha256=DzasNmIfUjd-FZE-vH18hwFXYuAFcz8Jy2Vbs77-C8k,6604
84
- neutronclient/osc/v2/dynamic_routing/bgp_speaker.py,sha256=Mw-xVRzf-DsIHh1E6Vtl25WrzRA-vAQjqCZ8kjR7EX0,11376
85
- neutronclient/osc/v2/dynamic_routing/constants.py,sha256=KFLE_7d9CTHZxuUIQy_9lGWNf7EGaqTnX6J-i7_CwaI,716
86
81
  neutronclient/osc/v2/fwaas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
82
  neutronclient/osc/v2/fwaas/constants.py,sha256=dI-FnDq-0c-jaZ3YcGe9o19QYa0XpBpELIlJi_tLuvw,961
88
83
  neutronclient/osc/v2/lbaas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -96,13 +91,6 @@ neutronclient/osc/v2/sfc/sfc_port_pair_group.py,sha256=3ZVLxJ8B2PkZV0dhwvPCFzEdB
96
91
  neutronclient/osc/v2/sfc/sfc_service_graph.py,sha256=Zn9_JsUYneKrrS486rlFIITWILCh7PAHpZCCN0ZRKiE,10187
97
92
  neutronclient/osc/v2/subnet_onboard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
93
  neutronclient/osc/v2/subnet_onboard/subnet_onboard.py,sha256=GK8LKPmkaN2lVt_QJnqq86ZL8d3xbC9CDCdiIu3mNhU,2091
99
- neutronclient/osc/v2/vpnaas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
- neutronclient/osc/v2/vpnaas/endpoint_group.py,sha256=8U5Nz-4iSocr29DwAVGm_SIhsDsjl8urEwxg-2x_U84,8133
101
- neutronclient/osc/v2/vpnaas/ikepolicy.py,sha256=8sAMJptfghCT6D7qRbRFbP210fWhr0PRCHFTyPZXpoQ,10539
102
- neutronclient/osc/v2/vpnaas/ipsec_site_connection.py,sha256=57DitWnWQdH0gINJV4W2a-_8i87lMjzN7XP7PTNCz18,15302
103
- neutronclient/osc/v2/vpnaas/ipsecpolicy.py,sha256=yBwcUQPqS_fzg9OoseLGBq_vtsTYfD2PQ2A47_6PK0M,10760
104
- neutronclient/osc/v2/vpnaas/utils.py,sha256=bCviT5_DpUgewZE0EfYzJvWV1ate_QZDYDiEr4c71t0,4312
105
- neutronclient/osc/v2/vpnaas/vpnservice.py,sha256=4pyieUWMJ26hhTiHIoQH5jN4XKo1pRJIgJ7kOs2p-98,9048
106
94
  neutronclient/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
95
  neutronclient/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
96
  neutronclient/tests/unit/test_casual_args.py,sha256=ckW0_DfdDD0mjUxPAAGjZyzzChp94vg-l2kRvK5YrGA,5814
@@ -114,11 +102,6 @@ neutronclient/tests/unit/test_validators.py,sha256=Clm9BLJ9F3cQSzqIExiookZ2Y-zV9
114
102
  neutronclient/tests/unit/osc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
103
  neutronclient/tests/unit/osc/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
104
  neutronclient/tests/unit/osc/v2/fakes.py,sha256=6qswG_w1Z9FEVYSxkiZCCjxM-nSZYigBAKK67L2lNhA,2031
117
- neutronclient/tests/unit/osc/v2/dynamic_routing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
118
- neutronclient/tests/unit/osc/v2/dynamic_routing/fakes.py,sha256=q1tXGsQCp7o9PtJY9l3Fgg9JmhEzrNbDABbsWuunyao,4765
119
- neutronclient/tests/unit/osc/v2/dynamic_routing/test_bgp_dragent.py,sha256=wpjF6JA6D9Dog1wWLldlLH9VkNVNZOG4MFQALQgA0K4,3295
120
- neutronclient/tests/unit/osc/v2/dynamic_routing/test_bgp_peer.py,sha256=AWFFr-5TGtFjLGjSY4lU7Oji6AbcKYh_w1wd-5AvYPg,4829
121
- neutronclient/tests/unit/osc/v2/dynamic_routing/test_bgp_speaker.py,sha256=GbvYqZATN5dLT1OQrlaAzSgLgT8DX3zIkm7ucrxKKeI,5214
122
105
  neutronclient/tests/unit/osc/v2/lbaas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
106
  neutronclient/tests/unit/osc/v2/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
107
  neutronclient/tests/unit/osc/v2/logging/fakes.py,sha256=tNETN4UoB7JVkPF9F34Vs4Nq_BTCrEI8uvBaUElTO4o,2490
@@ -132,21 +115,13 @@ neutronclient/tests/unit/osc/v2/sfc/test_port_pair_group.py,sha256=v_cfgHCpttbXp
132
115
  neutronclient/tests/unit/osc/v2/sfc/test_service_graph.py,sha256=lfwO5vGtqDEI_xcrs8EVGF_-Et7SdLAJReFPu8nNQCY,12037
133
116
  neutronclient/tests/unit/osc/v2/subnet_onboard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
117
  neutronclient/tests/unit/osc/v2/subnet_onboard/test_network_onboard_subnets.py,sha256=YRTVpvZiJ-EfzLQS2UX16IgoIX7vTNm_irglRqEe2YI,1907
135
- neutronclient/tests/unit/osc/v2/vpnaas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
- neutronclient/tests/unit/osc/v2/vpnaas/common.py,sha256=hYbpOr6MM8nZ__HHfrji5OITJO8PcHwMPQOoCnuZQNs,6734
137
- neutronclient/tests/unit/osc/v2/vpnaas/fakes.py,sha256=oI9C_HE1yfA55w4CWKg6UiAg513WsNigiyeR69m8tAI,7121
138
- neutronclient/tests/unit/osc/v2/vpnaas/test_endpoint_group.py,sha256=AekVbOf77XsHbyWNQowkC9YDWIg3qsZTQtKtCEKzAuo,8731
139
- neutronclient/tests/unit/osc/v2/vpnaas/test_ikepolicy.py,sha256=ITofRBb1BloAauESTAQSxaL8ma7ThJakmqf4bRmIIDc,11182
140
- neutronclient/tests/unit/osc/v2/vpnaas/test_ipsec_site_connection.py,sha256=xfwIWJvc8vWns2xthOaoXxQxCujPDgG5BC1OZYon3wY,13368
141
- neutronclient/tests/unit/osc/v2/vpnaas/test_ipsecpolicy.py,sha256=XwOQvyj54yHd2xNkPOS0ERRKLLr3zie6H6M4jaOYvMw,10566
142
- neutronclient/tests/unit/osc/v2/vpnaas/test_vpnservice.py,sha256=dXPhpvfrEA_uvvZ_nhtCWXzXFX7x3uxGu3p8XohH8Ko,9994
143
118
  neutronclient/v2_0/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
144
119
  neutronclient/v2_0/client.py,sha256=uYxHWtHXq2mWhM707UBu8De-q6ohlVp0-xklsH_s8rE,116835
145
- python_neutronclient-12.0.0.dist-info/licenses/AUTHORS,sha256=hUa35KbI6UW9BTxvh4kgQrm3uxle5ket9_kfETkZ5zU,13611
146
- python_neutronclient-12.0.0.dist-info/licenses/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
147
- python_neutronclient-12.0.0.dist-info/METADATA,sha256=dIClGrjNX5ZCcan1baW7sCNsvdW2NiLzEE0mFMub8eM,3496
148
- python_neutronclient-12.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
149
- python_neutronclient-12.0.0.dist-info/entry_points.txt,sha256=f1N0Ez4Zajmw7yQ1KGyY7_Wjk0HqQgbokUxsAsH-ZAI,6745
150
- python_neutronclient-12.0.0.dist-info/pbr.json,sha256=ThbeTag8WoZXJ65GoTSiXCEbfUJ_qo1mrLrmewp5rW0,46
151
- python_neutronclient-12.0.0.dist-info/top_level.txt,sha256=SxHuzHShRY_O8UAQAiwIMIjwHRm7Tr05U-cvrn1fLgU,14
152
- python_neutronclient-12.0.0.dist-info/RECORD,,
120
+ python_neutronclient-14.0.0.dist-info/licenses/AUTHORS,sha256=hUa35KbI6UW9BTxvh4kgQrm3uxle5ket9_kfETkZ5zU,13611
121
+ python_neutronclient-14.0.0.dist-info/licenses/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
122
+ python_neutronclient-14.0.0.dist-info/METADATA,sha256=aSCoifXbSiAzqFxbAu6InwHfd3OoHFZmEjbTuSc0Rms,3496
123
+ python_neutronclient-14.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
124
+ python_neutronclient-14.0.0.dist-info/entry_points.txt,sha256=9fcR4OiOT8Ytb6Of2kSNm6ek3ifptaC_T8Ax6d564WQ,3029
125
+ python_neutronclient-14.0.0.dist-info/pbr.json,sha256=a-cy3NwcVvEYdBEGOeLOIlx77dd2Pldf-SpgCV6EZmA,46
126
+ python_neutronclient-14.0.0.dist-info/top_level.txt,sha256=SxHuzHShRY_O8UAQAiwIMIjwHRm7Tr05U-cvrn1fLgU,14
127
+ python_neutronclient-14.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,38 @@
1
+ [openstack.cli.extension]
2
+ neutronclient = neutronclient.osc.plugin
3
+
4
+ [openstack.neutronclient.v2]
5
+ network_log_create = neutronclient.osc.v2.logging.network_log:CreateNetworkLog
6
+ network_log_delete = neutronclient.osc.v2.logging.network_log:DeleteNetworkLog
7
+ network_log_list = neutronclient.osc.v2.logging.network_log:ListNetworkLog
8
+ network_log_set = neutronclient.osc.v2.logging.network_log:SetNetworkLog
9
+ network_log_show = neutronclient.osc.v2.logging.network_log:ShowNetworkLog
10
+ network_loggable_resources_list = neutronclient.osc.v2.logging.network_log:ListLoggableResource
11
+ network_onboard_subnets = neutronclient.osc.v2.subnet_onboard.subnet_onboard:NetworkOnboardSubnets
12
+ sfc_flow_classifier_create = neutronclient.osc.v2.sfc.sfc_flow_classifier:CreateSfcFlowClassifier
13
+ sfc_flow_classifier_delete = neutronclient.osc.v2.sfc.sfc_flow_classifier:DeleteSfcFlowClassifier
14
+ sfc_flow_classifier_list = neutronclient.osc.v2.sfc.sfc_flow_classifier:ListSfcFlowClassifier
15
+ sfc_flow_classifier_set = neutronclient.osc.v2.sfc.sfc_flow_classifier:SetSfcFlowClassifier
16
+ sfc_flow_classifier_show = neutronclient.osc.v2.sfc.sfc_flow_classifier:ShowSfcFlowClassifier
17
+ sfc_port_chain_create = neutronclient.osc.v2.sfc.sfc_port_chain:CreateSfcPortChain
18
+ sfc_port_chain_delete = neutronclient.osc.v2.sfc.sfc_port_chain:DeleteSfcPortChain
19
+ sfc_port_chain_list = neutronclient.osc.v2.sfc.sfc_port_chain:ListSfcPortChain
20
+ sfc_port_chain_set = neutronclient.osc.v2.sfc.sfc_port_chain:SetSfcPortChain
21
+ sfc_port_chain_show = neutronclient.osc.v2.sfc.sfc_port_chain:ShowSfcPortChain
22
+ sfc_port_chain_unset = neutronclient.osc.v2.sfc.sfc_port_chain:UnsetSfcPortChain
23
+ sfc_port_pair_create = neutronclient.osc.v2.sfc.sfc_port_pair:CreateSfcPortPair
24
+ sfc_port_pair_delete = neutronclient.osc.v2.sfc.sfc_port_pair:DeleteSfcPortPair
25
+ sfc_port_pair_group_create = neutronclient.osc.v2.sfc.sfc_port_pair_group:CreateSfcPortPairGroup
26
+ sfc_port_pair_group_delete = neutronclient.osc.v2.sfc.sfc_port_pair_group:DeleteSfcPortPairGroup
27
+ sfc_port_pair_group_list = neutronclient.osc.v2.sfc.sfc_port_pair_group:ListSfcPortPairGroup
28
+ sfc_port_pair_group_set = neutronclient.osc.v2.sfc.sfc_port_pair_group:SetSfcPortPairGroup
29
+ sfc_port_pair_group_show = neutronclient.osc.v2.sfc.sfc_port_pair_group:ShowSfcPortPairGroup
30
+ sfc_port_pair_group_unset = neutronclient.osc.v2.sfc.sfc_port_pair_group:UnsetSfcPortPairGroup
31
+ sfc_port_pair_list = neutronclient.osc.v2.sfc.sfc_port_pair:ListSfcPortPair
32
+ sfc_port_pair_set = neutronclient.osc.v2.sfc.sfc_port_pair:SetSfcPortPair
33
+ sfc_port_pair_show = neutronclient.osc.v2.sfc.sfc_port_pair:ShowSfcPortPair
34
+ sfc_service_graph_create = neutronclient.osc.v2.sfc.sfc_service_graph:CreateSfcServiceGraph
35
+ sfc_service_graph_delete = neutronclient.osc.v2.sfc.sfc_service_graph:DeleteSfcServiceGraph
36
+ sfc_service_graph_list = neutronclient.osc.v2.sfc.sfc_service_graph:ListSfcServiceGraph
37
+ sfc_service_graph_set = neutronclient.osc.v2.sfc.sfc_service_graph:SetSfcServiceGraph
38
+ sfc_service_graph_show = neutronclient.osc.v2.sfc.sfc_service_graph:ShowSfcServiceGraph
@@ -0,0 +1 @@
1
+ {"git_version": "a12bb3c", "is_release": true}
File without changes
@@ -1,112 +0,0 @@
1
- # Licensed under the Apache License, Version 2.0 (the "License"); you may
2
- # not use this file except in compliance with the License. You may obtain
3
- # a copy of the License at
4
- #
5
- # http://www.apache.org/licenses/LICENSE-2.0
6
- #
7
- # Unless required by applicable law or agreed to in writing, software
8
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
- # License for the specific language governing permissions and limitations
11
- # under the License.
12
- #
13
-
14
- from osc_lib.command import command
15
- from osc_lib import utils
16
-
17
- from neutronclient._i18n import _
18
-
19
-
20
- def _format_alive_state(item):
21
- return ':-)' if item else 'XXX'
22
-
23
-
24
- _formatters = {
25
- 'alive': _format_alive_state
26
- }
27
-
28
-
29
- def add_common_args(parser):
30
- parser.add_argument('dragent_id',
31
- metavar='<agent-id>',
32
- help=_("ID of the dynamic routing agent"))
33
- parser.add_argument('bgp_speaker',
34
- metavar='<bgp-speaker>',
35
- help=_("ID or name of the BGP speaker"))
36
-
37
-
38
- class AddBgpSpeakerToDRAgent(command.Command):
39
- """Add a BGP speaker to a dynamic routing agent"""
40
-
41
- def get_parser(self, prog_name):
42
- parser = super(AddBgpSpeakerToDRAgent, self).get_parser(prog_name)
43
- add_common_args(parser)
44
- return parser
45
-
46
- def take_action(self, parsed_args):
47
- client = self.app.client_manager.network
48
- speaker_id = client.find_bgp_speaker(parsed_args.bgp_speaker).id
49
- client.add_bgp_speaker_to_dragent(parsed_args.dragent_id, speaker_id)
50
-
51
-
52
- class RemoveBgpSpeakerFromDRAgent(command.Command):
53
- """Removes a BGP speaker from a dynamic routing agent"""
54
-
55
- def get_parser(self, prog_name):
56
- parser = super(RemoveBgpSpeakerFromDRAgent, self).get_parser(
57
- prog_name)
58
- add_common_args(parser)
59
- return parser
60
-
61
- def take_action(self, parsed_args):
62
- client = self.app.client_manager.network
63
- speaker_id = client.find_bgp_speaker(parsed_args.bgp_speaker).id
64
- client.remove_bgp_speaker_from_dragent(parsed_args.dragent_id,
65
- speaker_id)
66
-
67
-
68
- class ListDRAgent(command.Lister):
69
- """List dynamic routing agents"""
70
-
71
- resource = 'agent'
72
- list_columns = ['id', 'host', 'admin_state_up', 'alive']
73
- unknown_parts_flag = False
74
-
75
- def get_parser(self, prog_name):
76
- parser = super(ListDRAgent,
77
- self).get_parser(prog_name)
78
- parser.add_argument('--bgp-speaker',
79
- metavar='<bgp-speaker>',
80
- help=_("List dynamic routing agents hosting a "
81
- "BGP speaker (name or ID)"))
82
- return parser
83
-
84
- def take_action(self, parsed_args):
85
- client = self.app.client_manager.network
86
- if parsed_args.bgp_speaker is not None:
87
- speaker_id = client.find_bgp_speaker(parsed_args.bgp_speaker).id
88
- data = client.get_bgp_dragents_hosting_speaker(speaker_id)
89
- else:
90
- attrs = {'agent_type': 'BGP dynamic routing agent'}
91
- data = client.agents(**attrs)
92
- columns = (
93
- 'id',
94
- 'agent_type',
95
- 'host',
96
- 'availability_zone',
97
- 'is_alive',
98
- 'is_admin_state_up',
99
- 'binary'
100
- )
101
- column_headers = (
102
- 'ID',
103
- 'Agent Type',
104
- 'Host',
105
- 'Availability Zone',
106
- 'Alive',
107
- 'State',
108
- 'Binary'
109
- )
110
- return (column_headers,
111
- (utils.get_item_properties(
112
- s, columns,) for s in data))
@@ -1,181 +0,0 @@
1
- # Licensed under the Apache License, Version 2.0 (the "License"); you may
2
- # not use this file except in compliance with the License. You may obtain
3
- # a copy of the License at
4
- #
5
- # http://www.apache.org/licenses/LICENSE-2.0
6
- #
7
- # Unless required by applicable law or agreed to in writing, software
8
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
- # License for the specific language governing permissions and limitations
11
- # under the License.
12
- #
13
-
14
- from osc_lib.command import command
15
- from osc_lib import utils
16
-
17
- from neutronclient._i18n import _
18
- from neutronclient.common import exceptions
19
- from neutronclient.common import utils as nc_utils
20
- from neutronclient.osc import utils as nc_osc_utils
21
- from neutronclient.osc.v2.dynamic_routing import constants
22
-
23
-
24
- def _get_attrs(client_manager, parsed_args):
25
- attrs = {}
26
-
27
- # Validate password
28
- if 'auth_type' in parsed_args:
29
- if parsed_args.auth_type != 'none':
30
- if 'password' not in parsed_args or parsed_args.password is None:
31
- raise exceptions.CommandError(_('Must provide password if '
32
- 'auth-type is specified.'))
33
- if (
34
- parsed_args.auth_type == 'none' and
35
- parsed_args.password is not None
36
- ):
37
- raise exceptions.CommandError(_('Must provide auth-type if '
38
- 'password is specified.'))
39
- attrs['auth_type'] = parsed_args.auth_type
40
-
41
- if parsed_args.name is not None:
42
- attrs['name'] = parsed_args.name
43
- if 'remote_as' in parsed_args:
44
- attrs['remote_as'] = parsed_args.remote_as
45
- if 'peer_ip' in parsed_args:
46
- attrs['peer_ip'] = parsed_args.peer_ip
47
- if 'password' in parsed_args:
48
- attrs['password'] = parsed_args.password
49
-
50
- if 'project' in parsed_args and parsed_args.project is not None:
51
- identity_client = client_manager.identity
52
- project_id = nc_osc_utils.find_project(
53
- identity_client,
54
- parsed_args.project,
55
- parsed_args.project_domain,
56
- ).id
57
- attrs['tenant_id'] = project_id
58
- return attrs
59
-
60
-
61
- class CreateBgpPeer(command.ShowOne):
62
- _description = _("Create a BGP peer")
63
-
64
- def get_parser(self, prog_name):
65
- parser = super(CreateBgpPeer, self).get_parser(prog_name)
66
- parser.add_argument(
67
- 'name',
68
- metavar='<name>',
69
- help=_("Name of the BGP peer to create"))
70
- parser.add_argument(
71
- '--peer-ip',
72
- metavar='<peer-ip-address>',
73
- required=True,
74
- help=_("Peer IP address"))
75
- parser.add_argument(
76
- '--remote-as',
77
- required=True,
78
- metavar='<peer-remote-as>',
79
- help=_("Peer AS number. (Integer in [%(min_val)s, %(max_val)s] "
80
- "is allowed)") % {'min_val': constants.MIN_AS_NUM,
81
- 'max_val': constants.MAX_AS_NUM})
82
- parser.add_argument(
83
- '--auth-type',
84
- metavar='<peer-auth-type>',
85
- choices=['none', 'md5'],
86
- type=nc_utils.convert_to_lowercase,
87
- default='none',
88
- help=_("Authentication algorithm. Supported algorithms: "
89
- "none (default), md5"))
90
- parser.add_argument(
91
- '--password',
92
- metavar='<auth-password>',
93
- help=_("Authentication password"))
94
- nc_osc_utils.add_project_owner_option_to_parser(parser)
95
- return parser
96
-
97
- def take_action(self, parsed_args):
98
- client = self.app.client_manager.network
99
- attrs = _get_attrs(self.app.client_manager, parsed_args)
100
- obj = client.create_bgp_peer(**attrs)
101
- display_columns, columns = nc_osc_utils._get_columns(obj)
102
- data = utils.get_dict_properties(obj, columns)
103
- return display_columns, data
104
-
105
-
106
- class DeleteBgpPeer(command.Command):
107
- _description = _("Delete a BGP peer")
108
-
109
- def get_parser(self, prog_name):
110
- parser = super(DeleteBgpPeer, self).get_parser(prog_name)
111
- parser.add_argument(
112
- 'bgp_peer',
113
- metavar="<bgp-peer>",
114
- help=_("BGP peer to delete (name or ID)")
115
- )
116
- return parser
117
-
118
- def take_action(self, parsed_args):
119
- client = self.app.client_manager.network
120
- id = client.find_bgp_peer(parsed_args.bgp_peer)['id']
121
- client.delete_bgp_peer(id)
122
-
123
-
124
- class ListBgpPeer(command.Lister):
125
- _description = _("List BGP peers")
126
-
127
- def take_action(self, parsed_args):
128
- data = self.app.client_manager.network.bgp_peers(retrieve_all=True)
129
- headers = ('ID', 'Name', 'Peer IP', 'Remote AS')
130
- columns = ('id', 'name', 'peer_ip', 'remote_as')
131
- return (headers,
132
- (utils.get_dict_properties(s, columns,) for s in data))
133
-
134
-
135
- class SetBgpPeer(command.Command):
136
- _description = _("Update a BGP peer")
137
- resource = constants.BGP_PEER
138
-
139
- def get_parser(self, prog_name):
140
- parser = super(SetBgpPeer, self).get_parser(prog_name)
141
- parser.add_argument(
142
- '--name',
143
- help=_("Updated name of the BGP peer"))
144
- parser.add_argument(
145
- '--password',
146
- metavar='<auth-password>',
147
- help=_("Updated authentication password"))
148
- parser.add_argument(
149
- 'bgp_peer',
150
- metavar="<bgp-peer>",
151
- help=_("BGP peer to update (name or ID)")
152
- )
153
- return parser
154
-
155
- def take_action(self, parsed_args):
156
- client = self.app.client_manager.network
157
- id = client.find_bgp_peer(parsed_args.bgp_peer)['id']
158
- attrs = _get_attrs(self.app.client_manager, parsed_args)
159
- client.update_bgp_peer(id, **attrs)
160
-
161
-
162
- class ShowBgpPeer(command.ShowOne):
163
- _description = _("Show information for a BGP peer")
164
-
165
- def get_parser(self, prog_name):
166
- parser = super(ShowBgpPeer, self).get_parser(prog_name)
167
- parser.add_argument(
168
- 'bgp_peer',
169
- metavar="<bgp-peer>",
170
- help=_("BGP peer to display (name or ID)")
171
- )
172
- return parser
173
-
174
- def take_action(self, parsed_args):
175
- client = self.app.client_manager.network
176
- id = client.find_bgp_peer(parsed_args.bgp_peer,
177
- ignore_missing=False).id
178
- obj = client.get_bgp_peer(id)
179
- display_columns, columns = nc_osc_utils._get_columns(obj)
180
- data = utils.get_dict_properties(obj, columns)
181
- return display_columns, data