We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a821330 + 84b30c6 commit 3de19cbCopy full SHA for 3de19cb
ibmcloud_python_sdk/cis/network/__init__.py
ibmcloud_python_sdk/cis/network/vlan.py
@@ -0,0 +1,24 @@
1
+from ibmcloud_python_sdk.utils import softlayer as sl
2
+from ibmcloud_python_sdk.utils.common import resource_error
3
+
4
5
+class Vlan():
6
7
+ def __init__(self):
8
+ self.client = sl.client()
9
+ self.nm = sl.SoftLayer.NetworkManager(self.client)
10
11
+ def get_vlans(self):
12
+ """Retrieve vlan list
13
14
+ :return: List of vlans
15
+ :rtype: dict
16
+ """
17
+ try:
18
+ vlan = {}
19
+ vlan["vlans"] = self.nm.list_vlans()
20
21
+ return vlan
22
23
+ except sl.SoftLayer.SoftLayerAPIError as error:
24
+ return resource_error(error.faultCode, error.faultString)
0 commit comments