File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,31 @@ def take_action(self, parsed_args):
2424 return rc
2525
2626
27+ class CephKeys (Command ):
28+ def get_parser (self , prog_name ):
29+ parser = super (CephKeys , self ).get_parser (prog_name )
30+ parser .add_argument (
31+ "--no-wait" ,
32+ default = False ,
33+ help = "Do not wait until the sync has been completed" ,
34+ action = "store_true" ,
35+ )
36+ return parser
37+
38+ def take_action (self , parsed_args ):
39+ # Check if tasks are locked before proceeding
40+ utils .check_task_lock_and_exit ()
41+
42+ wait = not parsed_args .no_wait
43+ arguments = []
44+ t = ansible .run .delay (
45+ "manager" , "copy-ceph-keys" , arguments , auto_release_time = 3600
46+ )
47+ logger .info (f"Task { t .task_id } (sync ceph-keys) started" )
48+ rc = handle_task (t , wait )
49+ return rc
50+
51+
2752class Sonic (Command ):
2853 def get_parser (self , prog_name ):
2954 parser = super (Sonic , self ).get_parser (prog_name )
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ osism.commands:
117117 sonic show = osism.commands.sonic:Show
118118 sonic sync = osism.commands.sync:Sonic
119119 sonic ztp = osism.commands.sonic:Ztp
120+ sync ceph-keys = osism.commands.sync:CephKeys
120121 sync configuration = osism.commands.configuration:Sync
121122 sync dnsmasq = osism.commands.manage:Dnsmasq
122123 sync facts = osism.commands.sync:Facts
You can’t perform that action at this time.
0 commit comments