Mark TODOs and modify some comments
Change-Id: I69f1da6283f9df88b10044e8d92f3c7f3b079cc1
This commit is contained in:
parent
14668f93e2
commit
3bcaa1cae4
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
TODOS
|
#TODO(changbl)
|
||||||
|
|
||||||
Networks:
|
Networks:
|
||||||
(use /24 address for now (faster OpenStack deployment), increase to /16 later)
|
(use /24 address for now (faster OpenStack deployment), increase to /16 later)
|
||||||
|
|
||||||
|
@ -17,8 +16,10 @@ rVMs eth1 IPs
|
||||||
[prefix]-worker-1, 10.251.1.1
|
[prefix]-worker-1, 10.251.1.1
|
||||||
[prefix]-worker-2(s), 10.251.1.2 [ - 10.251.255.254] # maximum ~65000
|
[prefix]-worker-2(s), 10.251.1.2 [ - 10.251.255.254] # maximum ~65000
|
||||||
|
|
||||||
|
#TODO(to-be-assigned)
|
||||||
WebUI: Horizon-based
|
WebUI: Horizon-based
|
||||||
|
|
||||||
|
#TODO(to-be-assigned)
|
||||||
templatize all templatable configurations (environments, roles, etc), put the
|
templatize all templatable configurations (environments, roles, etc), put the
|
||||||
rest (sensitive data) in a private configuration file specific to each
|
rest (sensitive data) in a private configuration file specific to each
|
||||||
developer/user
|
developer/user
|
||||||
|
@ -76,7 +77,7 @@ class Orchestrator(object):
|
||||||
@param pool: floating ip pool
|
@param pool: floating ip pool
|
||||||
@param user: username (with root permission) for all servers
|
@param user: username (with root permission) for all servers
|
||||||
@param image: default u1204-130531-gv
|
@param image: default u1204-130531-gv
|
||||||
@param flavor: default large
|
@param flavor: default medium
|
||||||
@param gateway_flavor: default tiny
|
@param gateway_flavor: default tiny
|
||||||
@param key_name: ssh public key to be injected
|
@param key_name: ssh public key to be injected
|
||||||
@param security_groups: firewall rules
|
@param security_groups: firewall rules
|
||||||
|
@ -91,8 +92,11 @@ class Orchestrator(object):
|
||||||
has finished launching, i.e., ssh-able + userdata done
|
has finished launching, i.e., ssh-able + userdata done
|
||||||
"""
|
"""
|
||||||
## check args
|
## check args
|
||||||
|
#TODO(changbl): remove the restriction of "num_workers <= 5"
|
||||||
if num_workers > 5:
|
if num_workers > 5:
|
||||||
raise ValueError("currently only supports num_workers <= 5")
|
raise ValueError("currently only supports num_workers <= 5")
|
||||||
|
#TODO(changbl): make separator '-' a constant and accessible
|
||||||
|
#everywhere
|
||||||
if '-' in prefix:
|
if '-' in prefix:
|
||||||
raise ValueError('"-" cannot exist in prefix=%r' % prefix)
|
raise ValueError('"-" cannot exist in prefix=%r' % prefix)
|
||||||
## args
|
## args
|
||||||
|
@ -391,9 +395,10 @@ class Orchestrator(object):
|
||||||
|
|
||||||
def _execute_funcs(self, funcs):
|
def _execute_funcs(self, funcs):
|
||||||
"""
|
"""
|
||||||
Execute functions, whether in parallel (via threads) or sequential.
|
Execute functions, whether in parallel (via threads) or
|
||||||
If parallel, exceptions of subthreads will be collected in a queue,
|
sequential. If parallel, exceptions of subthreads will be
|
||||||
and an exception will raised in main thread later
|
collected in a shared queue, and an exception will raised
|
||||||
|
in main thread later
|
||||||
|
|
||||||
@param funcs: the functions to be executed
|
@param funcs: the functions to be executed
|
||||||
"""
|
"""
|
||||||
|
@ -477,8 +482,8 @@ class Orchestrator(object):
|
||||||
|
|
||||||
class FuncThread(threading.Thread):
|
class FuncThread(threading.Thread):
|
||||||
"""
|
"""
|
||||||
thread of calling a partial function, based on the regular thread by adding
|
thread of calling a partial function, based on the regular thread
|
||||||
a exception queue
|
by adding a shared-with-others exception queue
|
||||||
"""
|
"""
|
||||||
def __init__(self, func, exception_queue):
|
def __init__(self, func, exception_queue):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
|
|
Loading…
Reference in New Issue