Beispiel #1
0
func (command *Push) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "push",
		ShortName:   "p",
		Description: "Push a new app or sync changes to an existing app",
		Usage: "Push a single app (with or without a manifest):\n" +
			"   CF_NAME push APP [-b BUILDPACK_NAME] [-c COMMAND] [-d DOMAIN] [-f MANIFEST_PATH]\n" +
			"   [-i NUM_INSTANCES] [-k DISK] [-m MEMORY] [-n HOST] [-p PATH] [-s STACK] [-t TIMEOUT]\n" +
			"   [--no-hostname] [--no-manifest] [--no-route] [--no-start]" +
			"\n\n   Push multiple apps with a manifest:\n" +
			"   CF_NAME push [-f MANIFEST_PATH]\n",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("b", "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", "Startup command, set to null to reset to default start command"),
			flag_helpers.NewStringFlag("d", "Domain (e.g. example.com)"),
			flag_helpers.NewStringFlag("f", "Path to manifest"),
			flag_helpers.NewIntFlag("i", "Number of instances"),
			flag_helpers.NewStringFlag("k", "Disk limit (e.g. 256M, 1024M, 1G)"),
			flag_helpers.NewStringFlag("m", "Memory limit (e.g. 256M, 1024M, 1G)"),
			flag_helpers.NewStringFlag("n", "Hostname (e.g. my-subdomain)"),
			flag_helpers.NewStringFlag("p", "Path of app directory or zip file"),
			flag_helpers.NewStringFlag("s", "Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)"),
			flag_helpers.NewStringFlag("t", "Start timeout in seconds"),
			cli.BoolFlag{Name: "no-hostname", Usage: "Map the root domain to this app"},
			cli.BoolFlag{Name: "no-manifest", Usage: "Ignore manifest file"},
			cli.BoolFlag{Name: "no-route", Usage: "Do not map a route to this app"},
			cli.BoolFlag{Name: "no-start", Usage: "Do not start an app after pushing"},
			cli.BoolFlag{Name: "random-route", Usage: "Create a random route for this app"},
		},
	}
}
Beispiel #2
0
func (command Target) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "target",
		ShortName:   "t",
		Description: "Set or view the targeted org or space",
		Usage:       "CF_NAME target [-o ORG] [-s SPACE]",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("o", "organization"),
			flag_helpers.NewStringFlag("s", "space"),
		},
	}
}
Beispiel #3
0
func (command *Scale) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "scale",
		Description: "Change or view the instance count, disk space limit, and memory limit for an app",
		Usage:       "CF_NAME scale APP [-i INSTANCES] [-k DISK] [-m MEMORY] [-f]",
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", "Number of instances"),
			flag_helpers.NewStringFlag("k", "Disk limit (e.g. 256M, 1024M, 1G)"),
			flag_helpers.NewStringFlag("m", "Memory limit (e.g. 256M, 1024M, 1G)"),
			cli.BoolFlag{Name: "f", Usage: "Force restart of app without prompt"},
		},
	}
}
func (command *UpdateUserProvidedService) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-user-provided-service",
		ShortName:   "uups",
		Description: "Update user-provided service instance name value pairs",
		Usage: "CF_NAME update-user-provided-service SERVICE_INSTANCE [-p PARAMETERS] [-l SYSLOG-DRAIN-URL]'\n\n" +
			"EXAMPLE:\n" +
			"   CF_NAME update-user-provided-service oracle-db-mine -p '{\"username\":\"admin\",\"password\":\"pa55woRD\"}'\n" +
			"   CF_NAME update-user-provided-service my-drain-service -l syslog://example.com\n",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", "Parameters"),
			flag_helpers.NewStringFlag("l", "Syslog Drain Url"),
		},
	}
}
Beispiel #5
0
func (command *updateQuota) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-quota",
		Description: "Update an existing resource quota",
		Usage:       "CF_NAME update-quota QUOTA [-m MEMORY] [-n NEW_NAME] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans | --disallow-paid-service-plans]",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("m", "Total amount of memory (e.g. 1024M, 1G, 10G)"),
			flag_helpers.NewStringFlag("n", "New name"),
			flag_helpers.NewIntFlag("r", "Total number of routes"),
			flag_helpers.NewIntFlag("s", "Total number of service instances"),
			cli.BoolFlag{Name: "allow-paid-service-plans", Usage: "Can provision instances of paid service plans"},
			cli.BoolFlag{Name: "disallow-paid-service-plans", Usage: "Cannot provision instances of paid service plans"},
		},
	}
}
Beispiel #6
0
func (command CreateSpace) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-space",
		Description: "Create a space",
		Usage:       "CF_NAME create-space SPACE [-o ORG]",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("o", "Organization"),
		},
	}
}
Beispiel #7
0
func (command *CreateRoute) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-route",
		Description: "Create a url route in a space for later use",
		Usage:       "CF_NAME create-route SPACE DOMAIN [-n HOSTNAME]",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("n", "Hostname"),
		},
	}
}
Beispiel #8
0
func (command *UnmapRoute) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "unmap-route",
		Description: "Remove a url route from an app",
		Usage:       "CF_NAME unmap-route APP DOMAIN [-n HOSTNAME]",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("n", "Hostname"),
		},
	}
}
func (command CreateUserProvidedService) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-user-provided-service",
		ShortName:   "cups",
		Description: "Make a user-provided service instance available to cf apps",
		Usage: "CF_NAME create-user-provided-service SERVICE_INSTANCE [-p PARAMETERS] [-l SYSLOG-DRAIN-URL]\n" +
			"\n   Pass comma separated parameter names to enable interactive mode:\n" +
			"   CF_NAME create-user-provided-service SERVICE_INSTANCE -p \"comma, separated, parameter, names\"\n" +
			"\n   Pass parameters as JSON to create a service non-interactively:\n" +
			"   CF_NAME create-user-provided-service SERVICE_INSTANCE -p '{\"name\":\"value\",\"name\":\"value\"}'\n" +
			"\nEXAMPLE:\n" +
			"   CF_NAME create-user-provided-service oracle-db-mine -p \"host, port, dbname, username, password\"\n" +
			"   CF_NAME create-user-provided-service oracle-db-mine -p '{\"username\":\"admin\",\"password\":\"pa55woRD\"}'\n" +
			"   CF_NAME create-user-provided-service my-drain-service -l syslog://example.com\n",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", "Parameters"),
			flag_helpers.NewStringFlag("l", "Syslog Drain Url"),
		},
	}
}
Beispiel #10
0
func (command *DeleteRoute) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "delete-route",
		Description: "Delete a route",
		Usage:       "CF_NAME delete-route DOMAIN [-n HOSTNAME] [-f]",
		Flags: []cli.Flag{
			cli.BoolFlag{Name: "f", Usage: "Force deletion without confirmation"},
			flag_helpers.NewStringFlag("n", "Hostname"),
		},
	}
}
Beispiel #11
0
func (command Login) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "login",
		ShortName:   "l",
		Description: "Log user in",
		Usage: "CF_NAME login [-a API_URL] [-u USERNAME] [-p PASSWORD] [-o ORG] [-s SPACE]\n\n" +
			terminal.WarningColor("WARNING:\n   Providing your password as a command line option is highly discouraged\n   Your password may be visible to others and may be recorded in your shell history\n\n") +
			"EXAMPLE:\n" +
			"   CF_NAME login (omit username and password to login interactively -- CF_NAME will prompt for both)\n" +
			"   CF_NAME login -u [email protected] -p pa55woRD (specify username and password as arguments)\n" +
			"   CF_NAME login -u [email protected] -p \"my password\" (use quotes for passwords with a space)\n" +
			"   CF_NAME login -u [email protected] -p \"\\\"password\\\"\" (escape quotes if used in password)",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("a", "API endpoint (e.g. https://api.example.com)"),
			flag_helpers.NewStringFlag("u", "Username"),
			flag_helpers.NewStringFlag("p", "Password"),
			flag_helpers.NewStringFlag("o", "Org"),
			flag_helpers.NewStringFlag("s", "Space"),
			cli.BoolFlag{Name: "skip-ssl-validation", Usage: "Please don't"},
		},
	}
}
Beispiel #12
0
func (command PurgeServiceOffering) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "purge-service-offering",
		Description: "Recursively remove a service and child objects from Cloud Foundry database without making requests to a service broker",
		Usage: "CF_NAME purge-service-offering SERVICE [-p PROVIDER]" +
			"\n\nWARNING:\n" +
			"This operation assumes that the service broker responsible for this service offering is no longer available, and all service instances have been deleted, leaving orphan records in Cloud Foundry's database. All knowledge of the service will be removed from Cloud Foundry, including service instances and service bindings. No attempt will be made to contact the service broker; running this command without destroying the service broker will cause orphan service instances. After running this command you may want to run either delete-service-auth-token or delete-service-broker to complete the cleanup.",
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("p", "Provider"),
			cli.BoolFlag{Name: "f", Usage: "Force deletion without confirmation"},
		},
	}
}
Beispiel #13
0
func (command *Curl) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "curl",
		Description: "Executes a raw request, content-type set to application/json by default",
		Usage:       "CF_NAME curl PATH [-X METHOD] [-H HEADER] [-d DATA] [-i]",
		Flags: []cli.Flag{
			cli.StringFlag{Name: "X", Value: "GET", Usage: "HTTP method (GET,POST,PUT,DELETE,etc)"},
			flag_helpers.NewStringSliceFlag("H", "Custom headers to include in the request, flag can be specified multiple times"),
			flag_helpers.NewStringFlag("d", "HTTP data to include in the request body"),
			cli.BoolFlag{Name: "i", Usage: "Include response headers in the output"},
			cli.BoolFlag{Name: "v", Usage: "Enable CF_TRACE output for all requests and responses"},
		},
	}
}
Beispiel #14
0
func (command *UpdateBuildpack) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-buildpack",
		Description: "Update a buildpack",
		Usage:       "CF_NAME update-buildpack BUILDPACK [-p PATH] [-i POSITION] [--enable|--disable] [--lock|--unlock]",
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", "Buildpack position among other buildpacks"),
			flag_helpers.NewStringFlag("p", "Path to directory or zip file"),
			cli.BoolFlag{Name: "enable", Usage: "Enable the buildpack"},
			cli.BoolFlag{Name: "disable", Usage: "Disable the buildpack"},
			cli.BoolFlag{Name: "lock", Usage: "Lock the buildpack"},
			cli.BoolFlag{Name: "unlock", Usage: "Unlock the buildpack"},
		},
	}
}