You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/10/13 13:06:50 UTC

[27/50] stratos git commit: 180 char limit as of PEP8

180 char limit as of PEP8

Signed-off-by: Imesh Gunaratne <im...@apache.org>


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

Branch: refs/heads/stratos-4.1.x
Commit: 8d227ea2a85e2d2c77b345fdcc4f6a92644395a2
Parents: dd0120f
Author: Milindu Sanoj Kumarage <ag...@gmail.com>
Authored: Sun Aug 2 13:08:59 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue Oct 13 16:32:47 2015 +0530

----------------------------------------------------------------------
 .../src/main/python/cli/CLI.py                           | 11 +++++++----
 .../src/main/python/cli/Stratos.py                       |  3 ++-
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8d227ea2/components/org.apache.stratos.python.cli/src/main/python/cli/CLI.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cli/src/main/python/cli/CLI.py b/components/org.apache.stratos.python.cli/src/main/python/cli/CLI.py
index a1de37d..ae083cf 100755
--- a/components/org.apache.stratos.python.cli/src/main/python/cli/CLI.py
+++ b/components/org.apache.stratos.python.cli/src/main/python/cli/CLI.py
@@ -83,7 +83,7 @@ class CLI(Cmd):
     def do_add_user(self, line , opts=None):
         """Add a new user to the system"""
         try:
-            user = Stratos.list_users(opts.username, opts.password, opts.role_name, opts.first_name, opts.last_name,
+            user = Stratos.add_users(opts.username, opts.password, opts.role_name, opts.first_name, opts.last_name,
                                        opts.email, opts.profile_name)
             if user:
                 print("User successfully created")
@@ -139,7 +139,8 @@ class CLI(Cmd):
         table = PrintableTable()
         rows = [["Type", "Category", "Name", "Description", "Version", "Multi-Tenant"]]
         for cartridge in cartridges:
-            rows.append([cartridge['type'], cartridge['category'], cartridge['displayName'], cartridge['description'], cartridge['version'], cartridge['multiTenant']])
+            rows.append([cartridge['type'], cartridge['category'], cartridge['displayName'], cartridge['description'],
+                         cartridge['version'], cartridge['multiTenant']])
         table.add_rows(rows)
         table.print_table()
 
@@ -172,7 +173,8 @@ class CLI(Cmd):
             table = PrintableTable()
             rows = [["Type", "Category", "Name", "Description", "Version", "Multi-Tenant"]]
             for application in applications:
-                rows.append([application['type'], application['category'], application['displayName'], application['description'], application['version'], application['multiTenant']])
+                rows.append([application['type'], application['category'], application['displayName'],
+                             application['description'], application['version'], application['multiTenant']])
             table.add_rows(rows)
             table.print_table()
     """
@@ -215,7 +217,8 @@ class CLI(Cmd):
             table = PrintableTable()
             rows = [["Host ID", "Hostname", "Private IP Address", "Public IP Address"]]
             for kubernetes_cluster_host in kubernetes_cluster_hosts:
-                rows.append([kubernetes_cluster_host['hostId'], kubernetes_cluster_host['hostname'], kubernetes_cluster_host['privateIPAddress'], kubernetes_cluster_host['publicIPAddress']])
+                rows.append([kubernetes_cluster_host['hostId'], kubernetes_cluster_host['hostname'],
+                             kubernetes_cluster_host['privateIPAddress'], kubernetes_cluster_host['publicIPAddress']])
             table.add_rows(rows)
             table.print_table()
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d227ea2/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py b/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py
index 40d511f..3cfea19 100755
--- a/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py
+++ b/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py
@@ -104,7 +104,8 @@ class Stratos:
 
     @staticmethod
     def list_kubernetes_hosts(kubernetes_cluster_id):
-        return Stratos.get('kubernetesClusters/'+kubernetes_cluster_id+'/hosts', errorMessage='Kubernetes cluster not found')
+        return Stratos.get('kubernetesClusters/'+kubernetes_cluster_id+'/hosts',
+                           errorMessage='Kubernetes cluster not found')
 
 
     """