mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Insert branches so we don't just make everything
This commit is contained in:
parent
b577217e04
commit
61b5a133a7
@ -41,7 +41,9 @@ class Cloud(object):
|
||||
'''
|
||||
fun = '{0}.create'.format(self.provider(vm_))
|
||||
if not fun in self.clouds:
|
||||
print('Public cloud provider {0} is not available'.format(self.provider(vm_)))
|
||||
print('Public cloud provider {0} is not available'.format(
|
||||
self.provider(vm_))
|
||||
)
|
||||
priv, pub = saltcloud.utils.gen_keys(
|
||||
saltcloud.utils.get_option('keysize', self.opts, vm_)
|
||||
)
|
||||
@ -49,3 +51,15 @@ class Cloud(object):
|
||||
vm_['pub_key'] = pub
|
||||
vm_['priv_key'] = priv
|
||||
self.clouds['{0}.create'.format(self.provider(vm_))](vm_)
|
||||
|
||||
def run(self):
|
||||
'''
|
||||
Parse over the options passed on the command line and determine how to
|
||||
handle them
|
||||
'''
|
||||
if self.opts['name']:
|
||||
for vm_ in self.opts['vm']:
|
||||
if vm_['name'] == self.opts['name']:
|
||||
self.create(vm_)
|
||||
else:
|
||||
self.create_all()
|
||||
|
Loading…
Reference in New Issue
Block a user