Skip to content

Commit

Permalink
deploy: create and delete
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum committed Dec 17, 2023
1 parent b6ad9ab commit 919847a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions control/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,19 @@ def open_rados_connection(self, config):
type=str,
help="Create set of Gateway names",
)
subparsers = parser.add_subparsers(dest="subcommand")
valid_commands = ['create', 'delete']
for cmd in valid_commands:
subparsers.add_parser(cmd, help=f'{cmd} nvmeof gateway deployement')

args = parser.parse_args()
config = GatewayConfig(args.config)
gw_str = args.deployment
print (f"{config=} {gw_str=}")
cmd = args.subcommand
if cmd not in valid_commands:
print(f'Valid commands are {valid_commands}. Use --help for usage information.')
raise SystemExit

print (f"{config=} {cmd=} {gw_str=}")
rads = RadosConn(config)
#gw_str = '"GW1","GW2", "GW3"'

#rads.conn.mon_command('{"prefix":"nvme-gw create","ids":[' + gw_str + ']}', b'')

rads.conn.mon_command('{"prefix":"nvme-gw delete","ids":[' + gw_str + ']}', b'')

# config.get("ceph", "pool")


rads.conn.mon_command('{"prefix":"nvme-gw ' + cmd + '","ids":[' + gw_str + ']}', b'')

0 comments on commit 919847a

Please sign in to comment.