File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242try :
4343 from precache import apicache
4444except ImportError :
45- apicache = {}
45+ apicache = {'count' : 0 , 'verbs' : [], 'asyncapis' : [] }
4646
4747try :
4848 import readline
@@ -327,11 +327,14 @@ def do_sync(self, args):
327327 it rollbacks last datastore or api precached datastore.
328328 """
329329 response = self .make_request ("listApis" )
330- self .apicache = monkeycache (response )
331330 if response is None :
332- monkeyprint ("Failed to sync apis, check your config" )
331+ monkeyprint ("Failed to sync apis, please check your config?" )
332+ monkeyprint ("Note: `sync` requires api discovery service enabled" +
333+ " on the CloudStack management server" )
333334 return
335+ self .apicache = monkeycache (response )
334336 savecache (self .apicache , self .cache_file )
337+ monkeyprint ("%s APIs discovered and cached" % self .apicache ["count" ])
335338 self .loadcache ()
336339
337340 def do_api (self , args ):
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ def read_config(get_attr, set_attr):
9999 print "Welcome! Using `set` configure the necessary settings:"
100100 print " " .join (sorted (config_options ))
101101 print "Config file:" , config_file
102+ print "After setting up, run the `sync` command to sync apis\n "
102103
103104 missing_keys = []
104105 for section in config_fields .keys ():
You can’t perform that action at this time.
0 commit comments