1515The accept commands list is generated using the rhros_ls_mcps package itself,
1616where the reject and ignore list of commands come from this script.
1717"""
18+
1819from importlib .metadata import entry_points
1920
2021import sys
2829# - export:
2930# - cp:
3031REJECT_COMMANDS : set [str ] = {
31- "create" , "delete" , "update" , "set" , "unset" , "remove" , "add" , "abort" ,
32- "complete" , "revoke" , "issue" , "cleanup" , "migrate" , "resize" , "cleanup" ,
33- "shelve" , "unshelve" , "reboot" , "restart" , "rebuild" , "stop" , "restore" ,
34- "import" , "failover" , "associate" , "revert" , "run" , "save" , "shrink" ,
35- "reset" , "del" , "onboard" , "commit" , "unrescue" , "adopt" , "on" , "off" ,
36- "forcedown" , "detach" , "edit" , "lock" , "unlock" , "purge" , "rerun" ,
37- "attach" , "resume" , "start" , "pause" , "create-from-file" , "request-refresh" ,
38- "rename" , "post" , "clear" , "move" , "manage" , "enable" , "register" , "rescue" ,
39- "deploy" , "unpause" , "disable" , "benchmark metric create" , "abandon" ,
40- "renew" , "ssh" , "export" , "replace" , "alarm create" , "alarm update" ,
41- "alarm quota set" , "alarm state set" , "recover" , "cancel" , "unhold" , "accept" ,
42- "pull" , "exec" , "upgrade" , "suspend" , "disassociate" , "undeploy" , "grow" ,
43- "scale" , "execute" , "grant" , "confirm" , "kill" , "mark" , "eject" , "op" ,
44- "verification" , "reprocess" , "expand" , "evacuate" , "signed" , "axfr" ,
45- "unregister" , "clean" , "download" , "authorize" , "cp" , "submit" , "stage" ,
46- "promote" , "configure" , "inject" , "signal" , "release" ,
47-
32+ "create" ,
33+ "delete" ,
34+ "update" ,
35+ "set" ,
36+ "unset" ,
37+ "remove" ,
38+ "add" ,
39+ "abort" ,
40+ "complete" ,
41+ "revoke" ,
42+ "issue" ,
43+ "cleanup" ,
44+ "migrate" ,
45+ "resize" ,
46+ "cleanup" ,
47+ "shelve" ,
48+ "unshelve" ,
49+ "reboot" ,
50+ "restart" ,
51+ "rebuild" ,
52+ "stop" ,
53+ "restore" ,
54+ "import" ,
55+ "failover" ,
56+ "associate" ,
57+ "revert" ,
58+ "run" ,
59+ "save" ,
60+ "shrink" ,
61+ "reset" ,
62+ "del" ,
63+ "onboard" ,
64+ "commit" ,
65+ "unrescue" ,
66+ "adopt" ,
67+ "on" ,
68+ "off" ,
69+ "forcedown" ,
70+ "detach" ,
71+ "edit" ,
72+ "lock" ,
73+ "unlock" ,
74+ "purge" ,
75+ "rerun" ,
76+ "attach" ,
77+ "resume" ,
78+ "start" ,
79+ "pause" ,
80+ "create-from-file" ,
81+ "request-refresh" ,
82+ "rename" ,
83+ "post" ,
84+ "clear" ,
85+ "move" ,
86+ "manage" ,
87+ "enable" ,
88+ "register" ,
89+ "rescue" ,
90+ "deploy" ,
91+ "unpause" ,
92+ "disable" ,
93+ "benchmark metric create" ,
94+ "abandon" ,
95+ "renew" ,
96+ "ssh" ,
97+ "export" ,
98+ "replace" ,
99+ "alarm create" ,
100+ "alarm update" ,
101+ "alarm quota set" ,
102+ "alarm state set" ,
103+ "recover" ,
104+ "cancel" ,
105+ "unhold" ,
106+ "accept" ,
107+ "pull" ,
108+ "exec" ,
109+ "upgrade" ,
110+ "suspend" ,
111+ "disassociate" ,
112+ "undeploy" ,
113+ "grow" ,
114+ "scale" ,
115+ "execute" ,
116+ "grant" ,
117+ "confirm" ,
118+ "kill" ,
119+ "mark" ,
120+ "eject" ,
121+ "op" ,
122+ "verification" ,
123+ "reprocess" ,
124+ "expand" ,
125+ "evacuate" ,
126+ "signed" ,
127+ "axfr" ,
128+ "unregister" ,
129+ "clean" ,
130+ "download" ,
131+ "authorize" ,
132+ "cp" ,
133+ "submit" ,
134+ "stage" ,
135+ "promote" ,
136+ "configure" ,
137+ "inject" ,
138+ "signal" ,
139+ "release" ,
48140 # These are full names
49- "secret_store" , "baremetal_node_inspect" , "baremetal_node_service" ,
50- "baremetal_node_provide" , "aggregate_cache_image" , "alarm delete" ,
51- "cached_image_queue" , "baremetal_driver_passthru_call" ,
52- "baremetal_node_passthru_call" , "static-action_call" ,
53- "metric_benchmark measures add" , "metric_measures_batch-metrics" ,
141+ "secret_store" ,
142+ "baremetal_node_inspect" ,
143+ "baremetal_node_service" ,
144+ "baremetal_node_provide" ,
145+ "aggregate_cache_image" ,
146+ "alarm delete" ,
147+ "cached_image_queue" ,
148+ "baremetal_driver_passthru_call" ,
149+ "baremetal_node_passthru_call" ,
150+ "static-action_call" ,
151+ "metric_benchmark measures add" ,
152+ "metric_measures_batch-metrics" ,
54153 "metric_measures_batch-resources-metrics" ,
55-
56154 # This sounds intrusive: https://docs.openstack.org/senlin/rocky/user/nodes.html#checking-a-node
57155 "cluster_node_check" ,
58156}
59157
60158# These must be full names with the "_" suffix, and they are not really commands but artifacts
61159# from the arg parsing mechanism
62160IGNORE_COMMANDS : set [str ] = {
63- "database_" , "infra_optim_" , "load_balancer_" , "identity_" , "neutronclient_" ,
64- "rca_" , "object_store_" , "compute_" , "container_" , "dns_" , "key_manager_" ,
65- "application_catalog_" , "congressclient_" , "messaging_" , "baremetal_" , "image_" ,
66- "volume_" , "network_" , "clustering_" , "metric_" , "baremetal-introspection_" ,
67- "cluster_profile_type_ops_" , "workflow_engine_" , "data_processing_" ,
161+ "database_" ,
162+ "infra_optim_" ,
163+ "load_balancer_" ,
164+ "identity_" ,
165+ "neutronclient_" ,
166+ "rca_" ,
167+ "object_store_" ,
168+ "compute_" ,
169+ "container_" ,
170+ "dns_" ,
171+ "key_manager_" ,
172+ "application_catalog_" ,
173+ "congressclient_" ,
174+ "messaging_" ,
175+ "baremetal_" ,
176+ "image_" ,
177+ "volume_" ,
178+ "network_" ,
179+ "clustering_" ,
180+ "metric_" ,
181+ "baremetal-introspection_" ,
182+ "cluster_profile_type_ops_" ,
183+ "workflow_engine_" ,
184+ "data_processing_" ,
68185 "orchestration_" ,
69186}
70187
@@ -92,13 +209,17 @@ def osp_list_commands(verbs: set[str]) -> tuple[list[str], list[str]]:
92209
93210def get_openstackclient_version () -> str | None :
94211 import openstackclient
212+
95213 return openstackclient .__version__
96214
215+
97216def main () -> None :
98217 accept_commands , non_accept_commands = osc .osp_list_commands (osc .ACCEPT_COMMANDS )
99218 reject_commands , non_reject_commands = osc .osp_list_commands (REJECT_COMMANDS )
100219
101- undefined_commands : list [str ] = list (set (non_accept_commands ).intersection (non_reject_commands ) - IGNORE_COMMANDS )
220+ undefined_commands : list [str ] = list (
221+ set (non_accept_commands ).intersection (non_reject_commands ) - IGNORE_COMMANDS
222+ )
102223
103224 result = {
104225 "undefined_commands" : undefined_commands ,
@@ -109,5 +230,6 @@ def main() -> None:
109230 }
110231 yaml .dump (result , sys .stdout )
111232
233+
112234if __name__ == "__main__" :
113235 main ()
0 commit comments