Fix issues in naming and few other things

This commit is contained in:
ahmadbilalkhalid 2019-12-14 20:23:31 +05:00
commit 71279a968f
21 changed files with 274 additions and 281 deletions

View file

@ -18,8 +18,8 @@ def main():
pending_vms = []
for request_iterator in [
etcd_client.get_prefix(config['etcd']['REQUEST_PREFIX'], value_in_json=True),
etcd_client.watch_prefix(config['etcd']['REQUEST_PREFIX'], timeout=5, value_in_json=True),
etcd_client.get_prefix(config['etcd']['request_prefix'], value_in_json=True),
etcd_client.watch_prefix(config['etcd']['request_prefix'], timeout=5, value_in_json=True),
]:
for request_event in request_iterator:
request_entry = RequestEntry(request_event)
@ -46,7 +46,7 @@ def main():
r = RequestEntry.from_scratch(type="ScheduleVM",
uuid=pending_vm_entry.uuid,
hostname=pending_vm_entry.hostname,
request_prefix=config['etcd']['REQUEST_PREFIX'])
request_prefix=config['etcd']['request_prefix'])
request_pool.put(r)
elif request_entry.type == RequestType.ScheduleVM:
@ -72,7 +72,7 @@ def main():
r = RequestEntry.from_scratch(type=RequestType.InitVMMigration,
uuid=request_entry.uuid,
destination=request_entry.destination,
request_prefix=config['etcd']['REQUEST_PREFIX'])
request_prefix=config['etcd']['request_prefix'])
request_pool.put(r)
# If the Request is about a VM that just want to get started/created