Return-Path: X-Original-To: apmail-libcloud-notifications-archive@www.apache.org Delivered-To: apmail-libcloud-notifications-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7742D188C5 for ; Sun, 30 Aug 2015 12:32:50 +0000 (UTC) Received: (qmail 53710 invoked by uid 500); 30 Aug 2015 12:32:50 -0000 Delivered-To: apmail-libcloud-notifications-archive@libcloud.apache.org Received: (qmail 53619 invoked by uid 500); 30 Aug 2015 12:32:50 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 53437 invoked by uid 500); 30 Aug 2015 12:32:50 -0000 Delivered-To: apmail-libcloud-commits@libcloud.apache.org Received: (qmail 53429 invoked by uid 99); 30 Aug 2015 12:32:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Aug 2015 12:32:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F2477E040F; Sun, 30 Aug 2015 12:32:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tomaz@apache.org To: commits@libcloud.apache.org Date: Sun, 30 Aug 2015 12:32:56 -0000 Message-Id: In-Reply-To: <2c39014676264cbc8736d29087e2e8a1@git.apache.org> References: <2c39014676264cbc8736d29087e2e8a1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/21] libcloud git commit: [LIBCLOUD-737] Created function for creating a node. [LIBCLOUD-737] Created function for creating a node. Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b4ed5ea6 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b4ed5ea6 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b4ed5ea6 Branch: refs/heads/trunk Commit: b4ed5ea6701eacdc3688527a53dbc86a7a451a6c Parents: b90c561 Author: Anthony Shaw Authored: Wed Aug 26 19:48:31 2015 +1000 Committer: Anthony Shaw Committed: Wed Aug 26 19:48:31 2015 +1000 ---------------------------------------------------------------------- libcloud/loadbalancer/drivers/dimensiondata.py | 30 ++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/b4ed5ea6/libcloud/loadbalancer/drivers/dimensiondata.py ---------------------------------------------------------------------- diff --git a/libcloud/loadbalancer/drivers/dimensiondata.py b/libcloud/loadbalancer/drivers/dimensiondata.py index d294a9a..e44b77e 100644 --- a/libcloud/loadbalancer/drivers/dimensiondata.py +++ b/libcloud/loadbalancer/drivers/dimensiondata.py @@ -83,9 +83,13 @@ class DimensionDataLBDriver(Driver): kwargs['region'] = self.selected_region return kwargs + def create_balancer(self, name, port, protocol, algorithm, members): + + return True + def list_balancers(self): """ - List all loadbalancers inside a gepgraphy. + List all loadbalancers inside a geography. In Dimension Data terminology these are known as virtual listeners @@ -150,12 +154,36 @@ class DimensionDataLBDriver(Driver): def balancer_attach_member(self, balancer, member): return True + def balancer_attach_compute_node(self, balancer, node): + return True + def balancer_detach_member(self, balancer, member): return True def destroy_balancer(self, balancer): return True + def ex_create_node(self, + network_domain_id, + name, + ip, + ex_description, + connectionLimit=25000, + connectionRateLimit=2000): + create_node_elm = ET.Element('createNode', {'xmlns': SERVER_NS}) + ET.SubElement(create_node_elm, "networkDomainId").text = network_domain_id + ET.SubElement(create_node_elm, "description").text = ex_description + ET.SubElement(create_node_elm, "name").text = name + ET.SubElement(create_node_elm, "ipv4Address").text = ip + ET.SubElement(create_node_elm, "connectionLimit").text = connectionLimit + ET.SubElement(create_node_elm, "connectionRateLimit").text = connectionRateLimit + + self.connection.request_with_orgId_api_2( + 'networkDomainVip/createNode', + method='POST', + data=ET.tostring(create_node_elm)).object + return True + def ex_get_pools(self): pools = self.connection \ .request_with_orgId_api_2('networkDomainVip/pool').object