def __init__(self, vm_limit, azure_config, skip_setup, local): self.vm_limit = vm_limit # user input self.budget = 0 self.timestamp = datetime.now() self.cost_pred = 0 self.wf_end = None self.jobs_terminated = False self.last_resched = None self.workflow = Workflow() self.logwatcher = LogWatcher() self.schedule = Schedule() manager = Machine() manager.status = MachineStatus.manager manager.condor_slot = 'manager' self.machines = [manager] boot_entry = ScheduleEntry(Job('boot', None), manager, self.timestamp, self.timestamp) boot_entry.real_start = self.timestamp boot_entry.real_end = self.timestamp boot_entry.status = EntryStatus.completed self.schedule.add_entry_host(boot_entry, manager) self.local = local if azure_config and not local: hostname = socket.gethostname() self.exp = AzureExperiment(azure_config, skip_setup=skip_setup, name=hostname) self.master_addr = socket.gethostbyname(hostname) self.user = azure_config.admin_username else: self.exp = self.master_addr = self.user = None
def __init__(self): self.workflow = Workflow() self.creation_timestamp = self.timestamp = datetime.now() self.logwatcher = LogWatcher() manager = Machine() manager.status = MachineStatus.manager manager.condor_slot = 'local' self.machines = [manager] boot_entry = ScheduleEntry(Job('boot', None), manager, None, None) boot_entry.real_start = self.timestamp boot_entry.real_end = self.timestamp boot_entry.status = EntryStatus.completed self.entries = [boot_entry] self.entries_cid = {}