@@ -54,9 +54,39 @@ def upgrade():
5454 "-p" , "--parent" , help = "The parent process' name, if creating a process dependency"
5555)
5656@click .option (
57- "-c" , "--child" , help = "The child process' name, if creating a process dependency"
57+ "-c" ,
58+ "--child" ,
59+ help = "The child process' name, if creating a process dependency. For cluster/process relationships, the name of "
60+ "the process." ,
5861)
59- def create (topic , name , parent = None , child = None ):
62+ @click .option (
63+ "--max-processing" ,
64+ help = "For clusters, the max processing ability allocated to the cluster" ,
65+ )
66+ @click .option (
67+ "--max-memory" , help = "For clusters, the max memory allocated to the cluster"
68+ )
69+ @click .option (
70+ "--processing-unit" ,
71+ help = "For clusters, the unit of processing ability (Ghz, CPU, DPU, etc." ,
72+ )
73+ @click .option (
74+ "--memory-unit" , help = "For clusters, the unit of allocated memory (MB, GB, etc."
75+ )
76+ @click .option (
77+ "--cluster" , help = "For cluster/process relationships, the name of the cluster"
78+ )
79+ def create (
80+ topic ,
81+ name ,
82+ parent = None ,
83+ child = None ,
84+ max_processing = None ,
85+ processing_unit = None ,
86+ max_memory = None ,
87+ memory_unit = None ,
88+ cluster = None ,
89+ ):
6090 """
6191 Create an item that is within the valid topics list.
6292 :param topic: The name of the topic.
@@ -65,11 +95,32 @@ def create(topic, name, parent=None, child=None):
6595 :type name: string
6696 :param parent: The parent process' name, if creating a process dependency
6797 :type parent: string
68- :param child: The child process' name, if creating a process dependency
98+ :param child: The child process' name, if creating a process dependency. For cluster/process relationships, the
99+ name of the process.
69100 :type child: string
101+ :param max_processing: For performance clusters, the maximum processing ability allocated to the cluster
102+ :type max_processing: integer
103+ :param max_memory: For performance clusters, the maximum memory allocated to the cluster
104+ :type max_memory: integer
105+ :param processing_unit: For performance clusters, the unit of processing ability allocated to the cluster
106+ :type processing_unit: string
107+ :param memory_unit: For performance clusters, the unit of allocated memory to the cluster
108+ :type memory_unit: string
109+ :param cluster: For cluster/process relationships, the name of the cluster.
110+ :type cluster: string
70111 """
71112 click .echo ("Attempting to create %s with name %s" % (topic , name ))
72- data_store .topic_creator (topic = topic , name = name , parent = parent , child = child )
113+ data_store .topic_creator (
114+ topic = topic ,
115+ name = name ,
116+ parent = parent ,
117+ child = child ,
118+ max_processing = max_processing ,
119+ max_memory = max_memory ,
120+ processing_unit = processing_unit ,
121+ memory_unit = memory_unit ,
122+ cluster = cluster ,
123+ )
73124
74125
75126@main .command ()
@@ -81,7 +132,10 @@ def create(topic, name, parent=None, child=None):
81132@click .option (
82133 "-c" , "--child" , help = "The child process' name, if deleting a process dependency"
83134)
84- def delete (topic , name , parent = None , child = None ):
135+ @click .option (
136+ "--cluster" , help = "For cluster/process relationships, the name of the cluster"
137+ )
138+ def delete (topic , name , parent = None , child = None , cluster = None ):
85139 """
86140 Delete an item that is within the valid topics list and not a pre-loaded item.
87141 :param topic: The name of the topic.
@@ -90,20 +144,71 @@ def delete(topic, name, parent=None, child=None):
90144 :type name: string
91145 :param parent: The parent process' name, if deleting a process dependency
92146 :type parent: string
93- :param child: The child process' name, if deleting a process dependency
147+ :param child: The child process' name, if deleting a process dependency. For cluster/process relationships, the
148+ name of the process.
94149 :type child: string
150+ :param cluster: For cluster/process relationships, the name of the cluster.
151+ :type cluster: string
95152 """
96153 click .echo ("Attempting to delete %s with name %s" % (topic , name ))
97- data_store .topic_deleter (topic = topic , name = name , parent = parent , child = child )
154+ data_store .topic_deleter (
155+ topic = topic , name = name , parent = parent , child = child , cluster = cluster
156+ )
98157
99158
100159@main .command ()
101160@click .option ("-t" , "--topic" , help = "The topic being created" )
102161@click .option ("-i" , "--initial-name" , help = "The name that needs to be changed." )
103162@click .option ("-n" , "--name" , help = "The new name for the topic." )
104- def update (topic , initial_name , name ):
105-
163+ @click .option (
164+ "--max-processing" ,
165+ help = "For clusters, the max processing ability allocated to the cluster" ,
166+ )
167+ @click .option (
168+ "--max-memory" , help = "For clusters, the max memory allocated to the cluster"
169+ )
170+ @click .option (
171+ "--processing-unit" ,
172+ help = "For clusters, the unit of processing ability (Ghz, CPU, DPU, etc." ,
173+ )
174+ @click .option (
175+ "--memory-unit" , help = "For clusters, the unit of allocated memory (MB, GB, etc."
176+ )
177+ def update (
178+ topic ,
179+ initial_name ,
180+ name ,
181+ max_processing = None ,
182+ max_memory = None ,
183+ processing_unit = None ,
184+ memory_unit = None ,
185+ ):
186+ """
187+ Update an item that is within the valid topics list and not a pre-loaded item.
188+ :param topic: The name of the topic.
189+ :type topic: string
190+ :param initial_name: The revised name of the topic item to be updated.
191+ :type initial_name: string
192+ :param name: The original name of the topic item to be updated.
193+ :type name: string
194+ :param max_processing: For performance clusters, the maximum processing ability allocated to the cluster
195+ :type max_processing: string
196+ :param max_memory: For performance clusters, the maximum memory allocated to the cluster
197+ :type max_memory: string
198+ :param processing_unit: For performance clusters, the unit of processing ability allocated to the cluster
199+ :type processing_unit: string
200+ :param memory_unit: For performance clusters, the unit of allocated memory to the cluster
201+ :type memory_unit: string
202+ """
106203 click .echo (
107204 "Attempting to update %s with name %s to %s" % (topic , initial_name , name )
108205 )
109- data_store .topic_updater (topic = topic , initial_name = initial_name , name = name )
206+ data_store .topic_updater (
207+ topic = topic ,
208+ initial_name = initial_name ,
209+ name = name ,
210+ max_processing = max_processing ,
211+ max_memory = max_memory ,
212+ processing_unit = processing_unit ,
213+ memory_unit = memory_unit ,
214+ )
0 commit comments