libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [4/5] git commit: Update examples.
Date Mon, 03 Mar 2014 15:55:35 GMT
Update examples.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ce238b22
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ce238b22
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ce238b22

Branch: refs/heads/trunk
Commit: ce238b22153de0e66ee9750f6f2b03df940a4aa7
Parents: a4ed34e
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Mon Mar 3 14:30:00 2014 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Mon Mar 3 14:30:00 2014 +0100

----------------------------------------------------------------------
 docs/examples/loadbalancer/elb/complete_tut.py               | 6 +++---
 .../loadbalancer/elb/create_lb_connection_for_aws.py         | 2 +-
 docs/examples/loadbalancer/elb/create_lb_policy.py           | 4 ++--
 docs/examples/loadbalancer/elb/create_load_balancer.py       | 6 +++---
 .../loadbalancer/elb/ex_create_balancer_listeners.py         | 4 +---
 docs/examples/loadbalancer/elb/ex_delete_balancer_policy.py  | 4 +---
 docs/examples/loadbalancer/elb/ex_list_balancer_policies.py  | 8 +++++---
 .../loadbalancer/elb/ex_list_balancer_policy_types.py        | 6 ++----
 .../elb/ex_set_balancer_policies_backend_server.py           | 4 +---
 .../loadbalancer/elb/ex_set_balancer_policies_listener.py    | 4 +---
 docs/examples/loadbalancer/elb/list_load_balancer.py         | 4 ++--
 11 files changed, 22 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/complete_tut.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/complete_tut.py b/docs/examples/loadbalancer/elb/complete_tut.py
index 7907bca..7191ddc 100644
--- a/docs/examples/loadbalancer/elb/complete_tut.py
+++ b/docs/examples/loadbalancer/elb/complete_tut.py
@@ -9,9 +9,9 @@ SECRET_KEY = 'your secret key'
 
 def main():
     cls = get_driver(Provider.ELB)
-    driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
+    driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
-    print driver.list_balancers()
+    print(driver.list_balancers())
 
     # members associated with the load balancer
     members = (Member(None, '192.168.88.1', 8000),
@@ -23,7 +23,7 @@ def main():
         port=80,
         protocol='http',
         members=members)
-    print new_balancer
+    print(new_balancer)
 
     # create load balancer policy
     print driver.ex_create_balancer_policy(

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/create_lb_connection_for_aws.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/create_lb_connection_for_aws.py b/docs/examples/loadbalancer/elb/create_lb_connection_for_aws.py
index 19ad70f..62a767d 100644
--- a/docs/examples/loadbalancer/elb/create_lb_connection_for_aws.py
+++ b/docs/examples/loadbalancer/elb/create_lb_connection_for_aws.py
@@ -5,4 +5,4 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/create_lb_policy.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/create_lb_policy.py b/docs/examples/loadbalancer/elb/create_lb_policy.py
index 806f31e..faa6645 100644
--- a/docs/examples/loadbalancer/elb/create_lb_policy.py
+++ b/docs/examples/loadbalancer/elb/create_lb_policy.py
@@ -5,9 +5,9 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
-print driver.list_balancers()
+print(driver.list_balancers())
 
 # create load balancer policy
 driver.ex_create_balancer_policy(

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/create_load_balancer.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/create_load_balancer.py b/docs/examples/loadbalancer/elb/create_load_balancer.py
index 4866004..2673577 100644
--- a/docs/examples/loadbalancer/elb/create_load_balancer.py
+++ b/docs/examples/loadbalancer/elb/create_load_balancer.py
@@ -6,9 +6,9 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
-print driver.list_balancers()
+print(driver.list_balancers())
 
 # members associated with the load balancer
 members = (Member(None, '192.168.88.1', 8000),
@@ -20,4 +20,4 @@ new_balancer = driver.create_balancer(
     protocol='http',
     members=members)
 
-print new_balancer
+print(new_balancer)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/ex_create_balancer_listeners.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/ex_create_balancer_listeners.py b/docs/examples/loadbalancer/elb/ex_create_balancer_listeners.py
index 040034c..d735d3a 100644
--- a/docs/examples/loadbalancer/elb/ex_create_balancer_listeners.py
+++ b/docs/examples/loadbalancer/elb/ex_create_balancer_listeners.py
@@ -5,9 +5,7 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
-
-print driver.list_balancers()
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
 driver.ex_create_balancer_listeners(
     name='MyLB',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/ex_delete_balancer_policy.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/ex_delete_balancer_policy.py b/docs/examples/loadbalancer/elb/ex_delete_balancer_policy.py
index e8f95c9..d041c6f 100644
--- a/docs/examples/loadbalancer/elb/ex_delete_balancer_policy.py
+++ b/docs/examples/loadbalancer/elb/ex_delete_balancer_policy.py
@@ -5,9 +5,7 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
-
-print driver.list_balancers()
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
 driver.ex_delete_balancer_policy(
     name='MyLB',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/ex_list_balancer_policies.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/ex_list_balancer_policies.py b/docs/examples/loadbalancer/elb/ex_list_balancer_policies.py
index b91a29f..1356df1 100644
--- a/docs/examples/loadbalancer/elb/ex_list_balancer_policies.py
+++ b/docs/examples/loadbalancer/elb/ex_list_balancer_policies.py
@@ -5,8 +5,10 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
-print driver.list_balancers()
+balancer = driver.list_balancers()[0]
+policies = driver.ex_list_balancer_policies(balancer=balancer)
 
-print driver.ex_list_balancer_policies()
+print(balancer)
+print(policies)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/ex_list_balancer_policy_types.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/ex_list_balancer_policy_types.py b/docs/examples/loadbalancer/elb/ex_list_balancer_policy_types.py
index f5bb5e5..198a9f2 100644
--- a/docs/examples/loadbalancer/elb/ex_list_balancer_policy_types.py
+++ b/docs/examples/loadbalancer/elb/ex_list_balancer_policy_types.py
@@ -5,8 +5,6 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
-print driver.list_balancers()
-
-print driver.ex_list_balancer_policy_types()
+print(driver.ex_list_balancer_policy_types())

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/ex_set_balancer_policies_backend_server.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/ex_set_balancer_policies_backend_server.py b/docs/examples/loadbalancer/elb/ex_set_balancer_policies_backend_server.py
index 9a4386c..5168040 100644
--- a/docs/examples/loadbalancer/elb/ex_set_balancer_policies_backend_server.py
+++ b/docs/examples/loadbalancer/elb/ex_set_balancer_policies_backend_server.py
@@ -5,9 +5,7 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
-
-print driver.list_balancers()
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
 driver.ex_set_balancer_policies_backend_server(
     name='MyLB',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/ex_set_balancer_policies_listener.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/ex_set_balancer_policies_listener.py b/docs/examples/loadbalancer/elb/ex_set_balancer_policies_listener.py
index 4f52e98..2abfa86 100644
--- a/docs/examples/loadbalancer/elb/ex_set_balancer_policies_listener.py
+++ b/docs/examples/loadbalancer/elb/ex_set_balancer_policies_listener.py
@@ -5,9 +5,7 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
-
-print driver.list_balancers()
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
 driver.ex_set_balancer_policies_listener(
     name='MyLB',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/ce238b22/docs/examples/loadbalancer/elb/list_load_balancer.py
----------------------------------------------------------------------
diff --git a/docs/examples/loadbalancer/elb/list_load_balancer.py b/docs/examples/loadbalancer/elb/list_load_balancer.py
index 0f8dcd1..5b5c834 100644
--- a/docs/examples/loadbalancer/elb/list_load_balancer.py
+++ b/docs/examples/loadbalancer/elb/list_load_balancer.py
@@ -5,6 +5,6 @@ ACCESS_ID = 'your access id'
 SECRET_KEY = 'your secret key'
 
 cls = get_driver(Provider.ELB)
-driver = cls(key=ACCESS_ID, secret=SECRET_KEY, region='')
+driver = cls(key=ACCESS_ID, secret=SECRET_KEY)
 
-print driver.list_balancers()
+print(driver.list_balancers())


Mime
View raw message