File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ type cmdDeviceCreateStandalone struct {
1414 cmdDeviceCreate
1515 siteID string
1616 deviceName string
17+ deviceSlug string
1718}
1819
1920func buildCmdDeviceCreateStandalone () * cli.Command {
@@ -43,13 +44,18 @@ func (c *cmdDeviceCreateStandalone) Flags() []cli.Flag {
4344 Usage : "name for the new device" ,
4445 Destination : & c .deviceName ,
4546 Required : true ,
47+ }, & cli.StringFlag {
48+ Name : "device-slug" ,
49+ Usage : "slug for the new standalone device" ,
50+ Destination : & c .deviceSlug ,
4651 })
4752}
4853
4954func (c * cmdDeviceCreateStandalone ) do (ctx context.Context ) error {
5055 body , err := json .Marshal (map [string ]any {
5156 "site_id" : c .siteID ,
5257 "name" : c .deviceName ,
58+ "slug" : c .deviceSlug ,
5359 })
5460 if err != nil {
5561 return fmt .Errorf ("build request: %w" , err )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ OPTIONS:
1010 --verbose log extra details about the operation (default: false)
1111 --site-id value, -s value site ID where the device will be created
1212 --device-name value, -n value name for the new device
13+ --device-slug value slug for the new standalone device
1314 --help, -h show help
1415
1516ENVIRONMENT VARIABLES:
You can’t perform that action at this time.
0 commit comments