Example #1
0
func (cmd *DisableServiceAccess) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "disable-service-access",
		Description: T("Disable access to a service or service plan for one or all orgs"),
		Usage:       "CF_NAME disable-service-access SERVICE [-p PLAN] [-o ORG]",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", T("Disable access to a specified service plan")),
			flag_helpers.NewStringFlag("o", T("Disable access for a specified organization")),
		},
	}
}
Example #2
0
func (cmd *CopySource) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "copy-source",
		Description: T("Make a copy of app source code from one application to another.  Unless overridden, the copy-source command will restart the application."),
		Usage:       T("   CF_NAME copy-source SOURCE-APP TARGET-APP [-o TARGET-ORG] [-s TARGET-SPACE] [--no-restart]\n"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("o", T("Org that contains the target application")),
			flag_helpers.NewStringFlag("s", T("Space that contains the target application")),
			cli.BoolFlag{Name: "no-restart", Usage: T("Override restart of the application in target environment after copy-source completes")},
		},
	}
}
Example #3
0
func (cmd *ServiceAccess) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "service-access",
		Description: T("List service access settings"),
		Usage:       "CF_NAME service-access [-b BROKER] [-e SERVICE] [-o ORG]",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("b", T("access for plans of a particular broker")),
			flag_helpers.NewStringFlag("e", T("access for plans of a particular service offering")),
			flag_helpers.NewStringFlag("o", T("plans accessible by a particular organization")),
		},
	}
}
Example #4
0
func (cmd Target) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "target",
		ShortName:   "t",
		Description: T("Set or view the targeted org or space"),
		Usage:       T("CF_NAME target [-o ORG] [-s SPACE]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("o", T("organization")),
			flag_helpers.NewStringFlag("s", T("space")),
		},
	}
}
Example #5
0
File: scale.go Project: nttlabs/cli
func (cmd *Scale) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "scale",
		Description: T("Change or view the instance count, disk space limit, and memory limit for an app"),
		Usage:       T("CF_NAME scale APP [-i INSTANCES] [-k DISK] [-m MEMORY] [-f]"),
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", T("Number of instances")),
			flag_helpers.NewStringFlag("k", T("Disk limit (e.g. 256M, 1024M, 1G)")),
			flag_helpers.NewStringFlag("m", T("Memory limit (e.g. 256M, 1024M, 1G)")),
			cli.BoolFlag{Name: "f", Usage: T("Force restart of app without prompt")},
		},
	}
}
Example #6
0
func (cmd *UpdateZone) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-zone",
		ShortName:   "uz",
		Description: T("Update a zone"),
		Usage:       T("CF_NAME update-zone ZONE [-z ZONE] [-p PRIORITY] [-d DESCRIPTION]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("z", T("zone name")),
			flag_helpers.NewStringFlag("p", T("priority for zone")),
			flag_helpers.NewStringFlag("d", T("description")),
		},
	}
}
Example #7
0
func (cmd CreateZone) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-zone",
		ShortName:   "cz",
		Description: T("Create a zone"),
		Usage:       T("CF_NAME create-zone ZONE PRIORITY [-o ORGANIZATION] [-d DESCRIPTION] [--public]" + "\n\nTIP:\n" + "   PRIORITY is an integer."),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("o", T("organization (ignored when --public flag is given).")),
			flag_helpers.NewStringFlag("d", T("description")),
			cli.BoolFlag{Name: "public", Usage: T("To create a public zone (if this flag is not given, a private zone will be created)")},
		},
	}
}
Example #8
0
func (cmd CreateQuota) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-quota",
		Description: T("Define a new resource quota"),
		Usage:       T("CF_NAME create-quota QUOTA [-m TOTAL_MEMORY] [-i INSTANCE_MEMORY] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("i", T("Maximum amount of memory an application instance can have (e.g. 1024M, 1G, 10G). -1 represents an unlimited amount.")),
			flag_helpers.NewStringFlag("m", T("Total amount of memory (e.g. 1024M, 1G, 10G)")),
			flag_helpers.NewIntFlag("r", T("Total number of routes")),
			flag_helpers.NewIntFlag("s", T("Total number of service instances")),
			cli.BoolFlag{Name: "allow-paid-service-plans", Usage: T("Can provision instances of paid service plans")},
		},
	}
}
Example #9
0
File: curl.go Project: nttlabs/cli
func (cmd *Curl) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "curl",
		Description: T("Executes a raw request, content-type set to application/json by default"),
		Usage:       T("CF_NAME curl PATH [-iv] [-X METHOD] [-H HEADER] [-d DATA] [--output FILE]"),
		Flags: []cli.Flag{
			cli.BoolFlag{Name: "i", Usage: T("Include response headers in the output")},
			cli.BoolFlag{Name: "v", Usage: T("Enable CF_TRACE output for all requests and responses")},
			cli.StringFlag{Name: "X", Value: "GET", Usage: T("HTTP method (GET,POST,PUT,DELETE,etc)")},
			flag_helpers.NewStringSliceFlag("H", T("Custom headers to include in the request, flag can be specified multiple times")),
			flag_helpers.NewStringFlag("d", T("HTTP data to include in the request body")),
			flag_helpers.NewStringFlag("output", T("Write curl body to FILE instead of stdout")),
		},
	}
}
func (cmd *UpdateUserProvidedService) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-user-provided-service",
		ShortName:   "uups",
		Description: T("Update user-provided service instance name value pairs"),
		Usage: T(`CF_NAME update-user-provided-service SERVICE_INSTANCE [-p PARAMETERS] [-l SYSLOG-DRAIN-URL]'

EXAMPLE:
   CF_NAME update-user-provided-service oracle-db-mine -p '{"username":"******","password":"******"}'
   CF_NAME update-user-provided-service my-drain-service -l syslog://example.com`),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", T("Parameters")),
			flag_helpers.NewStringFlag("l", T("Syslog Drain Url")),
		},
	}
}
Example #11
0
func (cmd *updateQuota) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-quota",
		Description: T("Update an existing resource quota"),
		Usage:       T("CF_NAME update-quota QUOTA [-m TOTAL_MEMORY] [-i INSTANCE_MEMORY][-n NEW_NAME] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans | --disallow-paid-service-plans]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("i", T("Maximum amount of memory an application instance can have (e.g. 1024M, 1G, 10G)")),
			flag_helpers.NewStringFlag("m", T("Total amount of memory (e.g. 1024M, 1G, 10G)")),
			flag_helpers.NewStringFlag("n", T("New name")),
			flag_helpers.NewIntFlag("r", T("Total number of routes")),
			flag_helpers.NewIntFlag("s", T("Total number of service instances")),
			cli.BoolFlag{Name: "allow-paid-service-plans", Usage: T("Can provision instances of paid service plans")},
			cli.BoolFlag{Name: "disallow-paid-service-plans", Usage: T("Cannot provision instances of paid service plans")},
		},
	}
}
Example #12
0
func (cmd *UpdateService) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-service",
		Description: T("Update a service instance"),
		Usage:       T("CF_NAME update-service SERVICE [-p NEW_PLAN]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", T("Change service plan for a service instance")),
		},
	}
}
Example #13
0
func (cmd CreateSpace) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-space",
		Description: T("Create a space"),
		Usage:       T("CF_NAME create-space SPACE [-o ORG]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("o", T("Organization")),
		},
	}
}
Example #14
0
func (cmd *CreateRoute) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-route",
		Description: T("Create a url route in a space for later use"),
		Usage:       T("CF_NAME create-route SPACE DOMAIN [-n HOSTNAME]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("n", T("Hostname")),
		},
	}
}
Example #15
0
func (cmd *UnmapRoute) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "unmap-route",
		Description: T("Remove a url route from an app"),
		Usage:       T("CF_NAME unmap-route APP DOMAIN [-n HOSTNAME]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("n", T("Hostname")),
		},
	}
}
Example #16
0
func (cmd CreateOrg) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-org",
		ShortName:   "co",
		Description: T("Create an org"),
		Usage:       T("CF_NAME create-org ORG"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("q", T("Quota to assign to the newly created org (excluding this option results in assignment of default quota)")),
		},
	}
}
Example #17
0
func (cmd PurgeServiceOffering) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "purge-service-offering",
		Description: T("Recursively remove a service and child objects from Cloud Foundry database without making requests to a service broker"),
		Usage:       T("CF_NAME purge-service-offering SERVICE [-p PROVIDER]") + "\n\n" + scaryWarningMessage(),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", T("Provider")),
			cli.BoolFlag{Name: "f", Usage: T("Force deletion without confirmation")},
		},
	}
}
Example #18
0
func (cmd *DeleteRoute) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "delete-route",
		Description: T("Delete a route"),
		Usage:       T("CF_NAME delete-route DOMAIN [-n HOSTNAME] [-f]"),
		Flags: []cli.Flag{
			cli.BoolFlag{Name: "f", Usage: T("Force deletion without confirmation")},
			flag_helpers.NewStringFlag("n", T("Hostname")),
		},
	}
}
Example #19
0
func (cmd *UpdateBuildpack) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-buildpack",
		Description: T("Update a buildpack"),
		Usage:       T("CF_NAME update-buildpack BUILDPACK [-p PATH] [-i POSITION] [--enable|--disable] [--lock|--unlock]"),
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", T("Buildpack position among other buildpacks")),
			flag_helpers.NewStringFlag("p", T("Path to directory or zip file")),
			cli.BoolFlag{Name: "enable", Usage: T("Enable the buildpack")},
			cli.BoolFlag{Name: "disable", Usage: T("Disable the buildpack")},
			cli.BoolFlag{Name: "lock", Usage: T("Lock the buildpack")},
			cli.BoolFlag{Name: "unlock", Usage: T("Unlock the buildpack")},
		},
	}
}
func (cmd CreateUserProvidedService) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-user-provided-service",
		ShortName:   "cups",
		Description: T("Make a user-provided service instance available to cf apps"),
		Usage: T(`CF_NAME create-user-provided-service SERVICE_INSTANCE [-p CREDENTIALS] [-l SYSLOG-DRAIN-URL]

   Pass comma separated credential parameter names to enable interactive mode:
   CF_NAME create-user-provided-service SERVICE_INSTANCE -p "comma, separated, parameter, names"

   Pass credential parameters as JSON to create a service non-interactively:
   CF_NAME create-user-provided-service SERVICE_INSTANCE -p '{"name":"value","name":"value"}'

EXAMPLE:
   CF_NAME create-user-provided-service oracle-db-mine -p "username, password"
   CF_NAME create-user-provided-service oracle-db-mine -p '{"username":"******","password":"******"}'
   CF_NAME create-user-provided-service my-drain-service -l syslog://example.com
`),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", T("Credentials")),
			flag_helpers.NewStringFlag("l", T("Syslog Drain Url")),
		},
	}
}
Example #21
0
File: push.go Project: nttlabs/cli
func (cmd *Push) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "push",
		ShortName:   "p",
		Description: T("Push a new app or sync changes to an existing app"),
		Usage: T("Push a single app (with or without a manifest):\n") + T("   CF_NAME push APP [-b BUILDPACK_NAME] [-c COMMAND] [-d DOMAIN] [-f MANIFEST_PATH]\n") + T("   [-i NUM_INSTANCES] [-k DISK] [-m MEMORY] [-n HOST] [-p PATH] [-s STACK] [-t TIMEOUT] [-z ZONE]\n") +
			"   [--no-hostname] [--no-manifest] [--no-route] [--no-start]\n" +
			"\n" + T("   Push multiple apps with a manifest:\n") + T("   CF_NAME push [-f MANIFEST_PATH]\n"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("b", T("Custom buildpack by name (e.g. my-buildpack) or GIT URL (e.g. https://github.com/heroku/heroku-buildpack-play.git)")),
			flag_helpers.NewStringFlag("c", T("Startup command, set to null to reset to default start command")),
			flag_helpers.NewStringFlag("d", T("Domain (e.g. example.com)")),
			flag_helpers.NewStringFlag("f", T("Path to manifest")),
			flag_helpers.NewIntFlag("i", T("Number of instances")),
			flag_helpers.NewStringFlag("k", T("Disk limit (e.g. 256M, 1024M, 1G)")),
			flag_helpers.NewStringFlag("m", T("Memory limit (e.g. 256M, 1024M, 1G)")),
			flag_helpers.NewStringFlag("n", T("Hostname (e.g. my-subdomain)")),
			flag_helpers.NewStringFlag("p", T("Path to app directory or file")),
			flag_helpers.NewStringFlag("s", T("Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)")),
			flag_helpers.NewStringFlag("t", T("Maximum time (in seconds) for CLI to wait for application start, other server side timeouts may apply")),
			flag_helpers.NewStringFlag("z", T("Zone of an app")),
			cli.BoolFlag{Name: "no-hostname", Usage: T("Map the root domain to this app")},
			cli.BoolFlag{Name: "no-manifest", Usage: T("Ignore manifest file")},
			cli.BoolFlag{Name: "no-route", Usage: T("Do not map a route to this app")},
			cli.BoolFlag{Name: "no-start", Usage: T("Do not start an app after pushing")},
			cli.BoolFlag{Name: "random-route", Usage: T("Create a random route for this app")},
		},
	}
}