From 7dbb898651a98ebeb875c991890367b3d102732f Mon Sep 17 00:00:00 2001 From: Gert Kremer Date: Wed, 27 Mar 2013 11:04:27 +0100 Subject: [PATCH 1/2] Adding listNetworkACLs function to API --- CloudStack/Client.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CloudStack/Client.py b/CloudStack/Client.py index f7563b8..1cc8cd1 100644 --- a/CloudStack/Client.py +++ b/CloudStack/Client.py @@ -228,6 +228,27 @@ def updateNetwork(self, args={}): raise RuntimeError("Missing required argument 'id'") return self.request('updateNetwork', args) + + def listNetworkACLs(self, args={}): + ''' + args - A dictionary. The following are options for keys: + id - Lists network ACL with the specified ID + account - List resources by account. Must be used with the + domainId parameter. + domainid - list only resources belonging to the domain specified + isrecursive - defaults to false, but if true, lists all resources from + the parent specified by the domainId till leaves + keyword - List by keyword + listall - If set to false, list only resources belonging to the command's + caller; if set to true - list resources that the caller is authorized to see. + Default value is false + networkid - list network ACLs by network Id + projectid - list objects by project + tags - List resources by tags (key/value pairs) + traffictype - list network ACLs by traffic type - Ingress or Egress + ''' + + return self.request('listNetworkACLs', args) def createPhysicalNetwork(self, args={}): From 32b7c3f9c758cd4b7c5da8b1a7ad8d5e773e0cba Mon Sep 17 00:00:00 2001 From: Gert Kremer Date: Mon, 1 Jul 2013 17:14:13 +0200 Subject: [PATCH 2/2] Adding listVPCs support --- CloudStack/Client.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/CloudStack/Client.py b/CloudStack/Client.py index 1cc8cd1..75cf3ef 100644 --- a/CloudStack/Client.py +++ b/CloudStack/Client.py @@ -922,7 +922,40 @@ def listNetscalerLoadBalancers(self, args={}): ''' return self.request('listNetscalerLoadBalancers', args) - + + def listVPCs(self,args={}): + ''' + lists Virtual Private Clouds (VPCs) configured + + args - A dictionary. The following are options for keys: + account - list by account associated with the VPC. Must be used + with the domainId parameter. + account - List resources by account. Must be used with the domainId parameter. + cidr - list by cidr of the VPC. All VPC guest networks' cidrs should be within this CIDR + displaytext - List by display text of the VPC + domainid - list by domain ID associated with the VPC. If used with the account + parameter returns the VPC associated with the account for the specified domain. + domainid - list only resources belonging to the domain specified + id - list VPC by id false + isrecursive - defaults to false, but if true, lists all resources from the parent + specified by the domainId till leaves. + keyword - List by keyword + listall - If set to false, list only resources belonging to the command's caller; + if set to true - list resources that the caller is authorized to see. Default + value is false + name - list by name of the VPC + page - + pagesize - + projectid - list objects by project + restartrequired - list VPCs by restartRequired option + state - list VPCs by state + supportedservices - list VPC supporting certain services + tags - List resources by tags (key/value pairs) + vpcofferingid - list by ID of the VPC offering + zoneid - list by zone + ''' + + return self.request('listVPCs',args) def deployVirtualMachine(self, args={}): '''