1919from cliff import lister
2020from cliff import show
2121
22- from openstack import connection
23-
2422from openstackclient .common import exceptions
2523from openstackclient .common import utils
2624from openstackclient .identity import common as identity_common
@@ -41,12 +39,6 @@ def _format_router_external(item):
4139}
4240
4341
44- def _make_client_sdk (instance ):
45- """Return a network proxy"""
46- conn = connection .Connection (authenticator = instance .session .auth )
47- return conn .network
48-
49-
5042class CreateNetwork (show .ShowOne ):
5143 """Create new network"""
5244
@@ -96,8 +88,6 @@ def get_parser(self, prog_name):
9688
9789 def take_action (self , parsed_args ):
9890 self .log .debug ('take_action(%s)' % parsed_args )
99- self .app .client_manager .network = \
100- _make_client_sdk (self .app .client_manager )
10191 client = self .app .client_manager .network
10292 body = self .get_body (parsed_args )
10393 obj = client .create_network (** body )
@@ -138,8 +128,6 @@ def get_parser(self, prog_name):
138128
139129 def take_action (self , parsed_args ):
140130 self .log .debug ('take_action(%s)' % parsed_args )
141- self .app .client_manager .network = \
142- _make_client_sdk (self .app .client_manager )
143131 client = self .app .client_manager .network
144132 for network in parsed_args .networks :
145133 obj = client .find_network (network )
@@ -170,8 +158,6 @@ def get_parser(self, prog_name):
170158
171159 def take_action (self , parsed_args ):
172160 self .log .debug ('take_action(%s)' % parsed_args )
173- self .app .client_manager .network = \
174- _make_client_sdk (self .app .client_manager )
175161 client = self .app .client_manager .network
176162
177163 if parsed_args .long :
@@ -270,8 +256,6 @@ def get_parser(self, prog_name):
270256
271257 def take_action (self , parsed_args ):
272258 self .log .debug ('take_action(%s)' % parsed_args )
273- self .app .client_manager .network = \
274- _make_client_sdk (self .app .client_manager )
275259 client = self .app .client_manager .network
276260 obj = client .find_network (parsed_args .identifier , ignore_missing = False )
277261
@@ -306,8 +290,6 @@ def get_parser(self, prog_name):
306290
307291 def take_action (self , parsed_args ):
308292 self .log .debug ('take_action(%s)' % parsed_args )
309- self .app .client_manager .network = \
310- _make_client_sdk (self .app .client_manager )
311293 client = self .app .client_manager .network
312294 obj = client .find_network (parsed_args .identifier , ignore_missing = False )
313295 columns = sorted (obj .keys ())
0 commit comments