update cli to manage direct execution of profile and map

This commit is contained in:
Thomas S Hatch 2012-06-22 23:31:17 -06:00
parent 65a1a9679c
commit 43f611e690

View File

@ -108,7 +108,12 @@ class SaltCloud(object):
salt.log.set_logger_level(name, level)
import logging
# If statement here for when cloud query is added
import saltcloud
cloud = saltcloud.Cloud(self.opts)
cloud.run()
if self.opts['names'] and self.opts['profile']:
import saltcloud.cloud
cloud = saltcloud.cloud.Cloud(self.opts)
cloud.run_profile()
elif self.opts['map']:
import saltcloud.mapper
mapper = saltcloud.mapper.Map(self.opts)
mapper.run_map()