File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def register(parent: cli.Subparsers) -> None:
1313 parser = parent .add_parser (
1414 "api" , formatter_class = argparse .ArgumentDefaultsHelpFormatter
1515 )
16- subparsers = parser .add_subparsers (dest = "http_api_command " , required = True )
16+ subparsers = parser .add_subparsers (dest = "api_command " , required = True )
1717 for command in [
1818 DeviceCommand ,
1919 SiteCommand ,
@@ -22,7 +22,7 @@ def register(parent: cli.Subparsers) -> None:
2222
2323 @staticmethod
2424 async def run (args : argparse .Namespace ) -> None :
25- match args .http_api_command :
25+ match args .api_command :
2626 case "device" :
2727 await DeviceCommand .run (args )
2828 case "site" :
Original file line number Diff line number Diff line change @@ -20,9 +20,7 @@ def register(parent: cli.Subparsers) -> None:
2020 parser = parent .add_parser (
2121 "device" , formatter_class = argparse .ArgumentDefaultsHelpFormatter
2222 )
23- subparsers = parser .add_subparsers (
24- dest = "http_api_device_command" , required = True
25- )
23+ subparsers = parser .add_subparsers (dest = "device_command" , required = True )
2624 for command in [
2725 DeviceAssignBlueprintCommand ,
2826 DeviceCreateStandaloneCommand ,
@@ -36,7 +34,7 @@ def register(parent: cli.Subparsers) -> None:
3634
3735 @staticmethod
3836 async def run (args : argparse .Namespace ) -> None :
39- match args .http_api_device_command :
37+ match args .device_command :
4038 case "assign-blueprint" :
4139 await DeviceAssignBlueprintCommand .run (args )
4240 case "create-standalone" :
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def register(parent: cli.Subparsers) -> None:
1616 parser = parent .add_parser (
1717 "site" , formatter_class = argparse .ArgumentDefaultsHelpFormatter
1818 )
19- subparsers = parser .add_subparsers (dest = "http_api_site_command " , required = True )
19+ subparsers = parser .add_subparsers (dest = "site_command " , required = True )
2020 for command in [
2121 SiteCreateCommand ,
2222 SiteDeleteCommand ,
@@ -28,7 +28,7 @@ def register(parent: cli.Subparsers) -> None:
2828
2929 @staticmethod
3030 async def run (args : argparse .Namespace ) -> None :
31- match args .http_api_site_command :
31+ match args .site_command :
3232 case "create" :
3333 await SiteCreateCommand .run (args )
3434 case "delete" :
@@ -40,4 +40,4 @@ async def run(args: argparse.Namespace) -> None:
4040 case "update" :
4141 await SiteUpdateCommand .run (args )
4242 case _:
43- raise NotImplementedError (args .device_command )
43+ raise NotImplementedError (args .site_command )
You can’t perform that action at this time.
0 commit comments