File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 4141def cli (env , ** args ):
4242 """Order/create a dedicated server."""
4343 mgr = SoftLayer .HardwareManager (env .client )
44+ network = SoftLayer .NetworkManager (env .client )
45+
46+ pods = network .get_closed_pods ()
47+ closure = []
4448
4549 # Get the SSH keys
4650 ssh_keys = []
@@ -99,6 +103,10 @@ def cli(env, **args):
99103 return
100104
101105 if do_create :
106+ for pod in pods :
107+ if args .get ('datacenter' ) in str (pod ['name' ]):
108+ closure .append (pod ['name' ])
109+ click .secho (click .style ('Warning: Closed soon: %s' % (', ' .join (closure )), fg = 'yellow' ))
102110 if not (env .skip_confirmations or formatting .confirm (
103111 "This action will incur charges on your account. Continue?" )):
104112 raise exceptions .CLIAbort ('Aborting dedicated server order.' )
Original file line number Diff line number Diff line change @@ -218,8 +218,16 @@ def cli(env, **args):
218218 create_args = _parse_create_args (env .client , args )
219219 test = args .get ('test' , False )
220220 do_create = not (args .get ('export' ) or test )
221+ network = SoftLayer .NetworkManager (env .client )
222+
223+ pods = network .get_closed_pods ()
224+ closure = []
221225
222226 if do_create :
227+ for pod in pods :
228+ if args .get ('datacenter' ) in str (pod ['name' ]):
229+ closure .append (pod ['name' ])
230+ click .secho (click .style ('Warning: Closed soon: %s' % (', ' .join (closure )), fg = 'yellow' ))
223231 if not (env .skip_confirmations or formatting .confirm (
224232 "This action will incur charges on your account. Continue?" )):
225233 raise exceptions .CLIAbort ('Aborting virtual server order.' )
You can’t perform that action at this time.
0 commit comments