Browse Source

Mark TODOs and modify some comments

Change-Id: I69f1da6283f9df88b10044e8d92f3c7f3b079cc1
Changbin Liu 5 years ago
parent
commit
3bcaa1cae4
1 changed files with 13 additions and 8 deletions
  1. 13
    8
      inception/orchestrator.py

+ 13
- 8
inception/orchestrator.py View File

@@ -1,7 +1,6 @@
1 1
 #!/usr/bin/env python
2 2
 """
3
-TODOS
4
-
3
+#TODO(changbl)
5 4
 Networks:
6 5
 (use /24 address for now (faster OpenStack deployment), increase to /16 later)
7 6
 
@@ -17,8 +16,10 @@ rVMs eth1 IPs
17 16
 [prefix]-worker-1, 10.251.1.1
18 17
 [prefix]-worker-2(s), 10.251.1.2 [ - 10.251.255.254] # maximum ~65000
19 18
 
19
+#TODO(to-be-assigned)
20 20
 WebUI: Horizon-based
21 21
 
22
+#TODO(to-be-assigned)
22 23
 templatize all templatable configurations (environments, roles, etc), put the
23 24
 rest (sensitive data) in a private configuration file specific to each
24 25
 developer/user
@@ -76,7 +77,7 @@ class Orchestrator(object):
76 77
         @param pool: floating ip pool
77 78
         @param user: username (with root permission) for all servers
78 79
         @param image: default u1204-130531-gv
79
-        @param flavor: default large
80
+        @param flavor: default medium
80 81
         @param gateway_flavor: default tiny
81 82
         @param key_name: ssh public key to be injected
82 83
         @param security_groups: firewall rules
@@ -91,8 +92,11 @@ class Orchestrator(object):
91 92
             has finished launching, i.e., ssh-able + userdata done
92 93
         """
93 94
         ## check args
95
+        #TODO(changbl): remove the restriction of "num_workers <= 5"
94 96
         if num_workers > 5:
95 97
             raise ValueError("currently only supports num_workers <= 5")
98
+        #TODO(changbl): make separator '-' a constant and accessible
99
+        #everywhere
96 100
         if '-' in prefix:
97 101
             raise ValueError('"-" cannot exist in prefix=%r' % prefix)
98 102
         ## args
@@ -391,9 +395,10 @@ class Orchestrator(object):
391 395
 
392 396
     def _execute_funcs(self, funcs):
393 397
         """
394
-        Execute functions, whether in parallel (via threads) or sequential.
395
-            If parallel, exceptions of subthreads will be collected in a queue,
396
-            and an exception will raised in main thread later
398
+        Execute functions, whether in parallel (via threads) or
399
+            sequential.  If parallel, exceptions of subthreads will be
400
+            collected in a shared queue, and an exception will raised
401
+            in main thread later
397 402
 
398 403
         @param funcs: the functions to be executed
399 404
         """
@@ -477,8 +482,8 @@ class Orchestrator(object):
477 482
 
478 483
 class FuncThread(threading.Thread):
479 484
     """
480
-    thread of calling a partial function, based on the regular thread by adding
481
-    a exception queue
485
+    thread of calling a partial function, based on the regular thread
486
+    by adding a shared-with-others exception queue
482 487
     """
483 488
     def __init__(self, func, exception_queue):
484 489
         threading.Thread.__init__(self)

Loading…
Cancel
Save