Exemplo n.º 1
0
 def run(self):
     self.process_delegate_list()
     for d in self.args.delegate_list:
         s = Subnet(self.args, d)
         s_obj = s.subnet_obj(create=False)
         if s_obj:
             s.wipeout(dry_run=self.args.dry_run)
Exemplo n.º 2
0
 def run(self):
     self.process_delegate_list()
     for d in self.args.delegate_list:
         s = Subnet(self.args, d)
         s_obj = s.subnet_obj(create=False)
         if s_obj:
             s.wipeout(dry_run=self.args.dry_run)
Exemplo n.º 3
0
 def test_subnet_cache(self):
     self.reset_yaml()
     handson.myyaml.yaml_file_name('./aws.yaml')
     handson.myyaml.load()
     tsc_parser = subcommand_parser_with_retag()
     tsc_args = tsc_parser.parse_args([])
     s = Subnet(tsc_args, 1)
     s.subnet_obj()  # loads from yaml
     s.subnet_obj()  # loads from cache
Exemplo n.º 4
0
 def test_subnet_cache(self):
     self.reset_yaml()
     handson.myyaml.yaml_file_name('./aws.yaml')
     handson.myyaml.load()
     tsc_parser = subcommand_parser_with_retag()
     tsc_args = tsc_parser.parse_args([])
     s = Subnet(tsc_args, 1)
     s.subnet_obj()  # loads from yaml
     s.subnet_obj()  # loads from cache
Exemplo n.º 5
0
 def __init__(self, args, delegate):
     super(Delegate, self).__init__(args)
     self.args = args
     k = Keypair(self.args, delegate)
     k.keypair_obj(import_ok=True, dry_run=self.args.dry_run)
     s = Subnet(self.args, delegate)
     s_obj = s.subnet_obj(create=True, dry_run=self.args.dry_run)
     ec2 = self.ec2()
     self._delegate = {
         'delegate': delegate,
         'ec2': ec2,
         'keyname': k.get_keyname_from_yaml(),
         'roles': {},
         'subnet_obj': s_obj,
     }
Exemplo n.º 6
0
 def __init__(self, args, delegate):
     super(Delegate, self).__init__(args)
     self.args = args
     k = Keypair(self.args, delegate)
     k.keypair_obj(import_ok=True, dry_run=self.args.dry_run)
     s = Subnet(self.args, delegate)
     s_obj = s.subnet_obj(create=True, dry_run=self.args.dry_run)
     ec2 = self.ec2()
     self._delegate = {
         "delegate": delegate,
         "ec2": ec2,
         "keyname": k.get_keyname_from_yaml(),
         "roles": {},
         "subnet_obj": s_obj,
     }
Exemplo n.º 7
0
 def run(self):
     delegates = handson.myyaml.stanza('delegates')
     log.info('Probing {!r} subnets'.format(delegates + 1))
     for d in range(0, delegates + 1):
         c = Subnet(self.args, d)
         c.subnet_obj(create=False)
Exemplo n.º 8
0
 def run(self):
     self.process_delegate_list()
     for d in self.args.delegate_list:
         log.info("Installing subnet for delegate {}".format(d))
         c = Subnet(self.args, d)
         c.subnet_obj(create=True, dry_run=self.args.dry_run)
Exemplo n.º 9
0
 def run(self):
     self.process_delegate_list()
     for d in self.args.delegate_list:
         log.info("Installing subnet for delegate {}".format(d))
         c = Subnet(self.args, d)
         c.subnet_obj(create=True, dry_run=self.args.dry_run)