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:48 UTC
[25/50] stratos git commit: added activate-tenant command
added activate-tenant command
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/623e4468
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/623e4468
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/623e4468
Branch: refs/heads/stratos-4.1.x
Commit: 623e4468cd97e982674bb09b4178fe4cf2873dca
Parents: 95e134e
Author: Milindu Sanoj Kumarage <ag...@gmail.com>
Authored: Tue Aug 4 12:18:56 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue Oct 13 16:32:47 2015 +0530
----------------------------------------------------------------------
.../src/main/python/cli/CLI.py | 22 ++++++++++++++++++++
1 file changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/623e4468/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 1bc773c..1715b82 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
@@ -223,6 +223,28 @@ class CLI(Cmd):
table.add_rows(rows)
table.print_table()
+ @options([
+ make_option('-u', '--username', type="str", help="Username of the user"),
+ make_option('-p', '--password', type="str", help="Password of the user"),
+ make_option('-t', '--tenant_domain', type="str", help="Cluster ID")
+ ])
+ @auth
+ def do_activate_tenant(self, line , opts=None):
+ """Retrieve detailed information on all Kubernetes-CoreOS Clusters."""
+ if not opts.tenant_domain:
+ print("usage: list-kubernetes-hosts [-c <tenant domain>]")
+ return
+ kubernetes_cluster_hosts = Stratos.list_kubernetes_hosts(opts.cluster_id)
+ if not kubernetes_cluster_hosts:
+ print("No kubernetes hosts found")
+ else:
+ 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']])
+ table.add_rows(rows)
+ table.print_table()
@options([])
def do_deploy_user(self, line , opts=None):
"""Illustrate the base class method use."""