You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/03/06 12:51:52 UTC
git commit: refs/heads/master - cloudmonkey: print sync stats,
asks users to use sync
Updated Branches:
refs/heads/master 38aec6fc4 -> cc9b7d4c2
cloudmonkey: print sync stats, asks users to use sync
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/cc9b7d4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/cc9b7d4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/cc9b7d4c
Branch: refs/heads/master
Commit: cc9b7d4c208ac68dc25f8507c6162f395400a8a7
Parents: 38aec6f
Author: Rohit Yadav <bh...@apache.org>
Authored: Wed Mar 6 17:20:40 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Wed Mar 6 17:21:32 2013 +0530
----------------------------------------------------------------------
tools/cli/cloudmonkey/cloudmonkey.py | 9 ++++++---
tools/cli/cloudmonkey/config.py | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cc9b7d4c/tools/cli/cloudmonkey/cloudmonkey.py
----------------------------------------------------------------------
diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py
index b5b185f..2542241 100644
--- a/tools/cli/cloudmonkey/cloudmonkey.py
+++ b/tools/cli/cloudmonkey/cloudmonkey.py
@@ -42,7 +42,7 @@ except ImportError, e:
try:
from precache import apicache
except ImportError:
- apicache = {}
+ apicache = {'count': 0, 'verbs': [], 'asyncapis': []}
try:
import readline
@@ -327,11 +327,14 @@ class CloudMonkeyShell(cmd.Cmd, object):
it rollbacks last datastore or api precached datastore.
"""
response = self.make_request("listApis")
- self.apicache = monkeycache(response)
if response is None:
- monkeyprint("Failed to sync apis, check your config")
+ monkeyprint("Failed to sync apis, please check your config?")
+ monkeyprint("Note: `sync` requires api discovery service enabled" +
+ " on the CloudStack management server")
return
+ self.apicache = monkeycache(response)
savecache(self.apicache, self.cache_file)
+ monkeyprint("%s APIs discovered and cached" % self.apicache["count"])
self.loadcache()
def do_api(self, args):
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cc9b7d4c/tools/cli/cloudmonkey/config.py
----------------------------------------------------------------------
diff --git a/tools/cli/cloudmonkey/config.py b/tools/cli/cloudmonkey/config.py
index 5dfe09b..6a5feab 100644
--- a/tools/cli/cloudmonkey/config.py
+++ b/tools/cli/cloudmonkey/config.py
@@ -99,6 +99,7 @@ def read_config(get_attr, set_attr):
print "Welcome! Using `set` configure the necessary settings:"
print " ".join(sorted(config_options))
print "Config file:", config_file
+ print "After setting up, run the `sync` command to sync apis\n"
missing_keys = []
for section in config_fields.keys():