示例#1
0
 def _new_instance_of(self, machine, start_date):
     # Create an instance of this machine
     instance_helper = CoreInstanceHelper("Mock Instance",
                                          uuid4(),
                                          start_date,
                                          machine=machine)
     instance = instance_helper.to_core_instance()
     return instance
示例#2
0
 def setUp(self):
     self.history_swap_every = relativedelta(minutes=30)
     self.start_time = self.begin_history = datetime(
         2015, 1, 1, tzinfo=pytz.utc
     )
     self.terminate_time = datetime(2015, 1, 8, tzinfo=pytz.utc)
     self.instance_helper = CoreInstanceHelper(
         "test_instance", uuid.uuid4(), self.start_time
     )
示例#3
0
    def setUp(self):
        self.start_time = datetime(2015, 1, 1, tzinfo=pytz.utc)

        provider_machine_helper = CoreProviderMachineHelper(
            'First machine', 'machine-1', 'openstack', self.start_time)
        self.machine_1 = provider_machine_helper.to_core_machine()

        self.instance_helper = CoreInstanceHelper("test_instance",
                                                  "1234-1234-1234-1234",
                                                  self.start_time,
                                                  machine=self.machine_1)
        self.instance_1 = self.instance_helper.to_core_instance()
        pass