Skip to content

Commit 75fa575

Browse files
Merge pull request #1707 from edsonarios/issue1706
Command slcli vlan create - displaying an error message
2 parents 3b517cb + 8c3edf1 commit 75fa575

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

SoftLayer/CLI/vlan/create.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@
1919
help="Billing rate")
2020
@environment.pass_env
2121
def cli(env, name, datacenter, pod, network, billing):
22-
"""Order/create a VLAN instance."""
22+
"""Order/create a VLAN instance.
23+
24+
Example:
25+
slcli vlan create --name myvlan --datacenter dal13
26+
or
27+
slcli vlan create --name myvlan --pod dal10.pod01
28+
"""
29+
30+
if not (datacenter or pod):
31+
raise exceptions.CLIAbort("--datacenter or --pod is required to create a VLAN")
2332

2433
item_package = ['PUBLIC_NETWORK_VLAN']
2534
complex_type = 'SoftLayer_Container_Product_Order_Network_Vlan'

0 commit comments

Comments
 (0)