Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monitoring flag #170

Merged
merged 4 commits into from
Dec 22, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions args.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const (
ArgIPv6 = "enable-ipv6"
// ArgPrivateNetworking is an enable private networking argument.
ArgPrivateNetworking = "enable-private-networking"
// ArgMonitoring is an enable monitoring argument.
ArgMonitoring = "enable-monitoring"
// ArgRecordData is a record data argument.
ArgRecordData = "record-data"
// ArgRecordID is a record id argument.
Expand Down
7 changes: 7 additions & 0 deletions commands/droplets.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func Droplet() *Command {
AddBoolFlag(cmdDropletCreate, doctl.ArgBackups, false, "Backup droplet")
AddBoolFlag(cmdDropletCreate, doctl.ArgIPv6, false, "IPv6 support")
AddBoolFlag(cmdDropletCreate, doctl.ArgPrivateNetworking, false, "Private networking")
AddBoolFlag(cmdDropletCreate, doctl.ArgMonitoring, false, "Monitoring")
AddStringFlag(cmdDropletCreate, doctl.ArgImage, "", "Droplet image",
requiredOpt())
AddStringFlag(cmdDropletCreate, doctl.ArgTagName, "", "Tag name")
Expand Down Expand Up @@ -172,6 +173,11 @@ func RunDropletCreate(c *CmdConfig) error {
return err
}

monitoring, err := c.Doit.GetBool(c.NS, doctl.ArgMonitoring)
if err != nil {
return err
}

keys, err := c.Doit.GetStringSlice(c.NS, doctl.ArgSSHKeys)
if err != nil {
return err
Expand Down Expand Up @@ -243,6 +249,7 @@ func RunDropletCreate(c *CmdConfig) error {
Backups: backups,
IPv6: ipv6,
PrivateNetworking: privateNetworking,
Monitoring: monitoring,
SSHKeys: sshKeys,
UserData: userData,
Tags: tagNames,
Expand Down