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

Doc formatting for rad_group_switch synopsis text #7962

Merged
merged 5 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
34 changes: 17 additions & 17 deletions pkg/cli/cmd/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,24 @@ func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
Short: "Deploy a template",
Long: `Deploy a Bicep or ARM template

The deploy command compiles a Bicep or ARM template and deploys it to your default environment (unless otherwise specified).

You can combine Radius types as as well as other types that are available in Bicep such as Azure resources. See
the Radius documentation for information about describing your application and resources with Bicep.
The deploy command compiles a Bicep or ARM template and deploys it to your default environment (unless otherwise specified).

You can specify parameters using the '--parameter' flag ('-p' for short). Parameters can be passed as:

- A file containing multiple parameters using the ARM JSON parameter format (see below)
- A file containing a single value in JSON format
- A key-value-pair passed in the command line

When passing multiple parameters in a single file, use the format described here:

https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/parameter-files

You can specify parameters using multiple sources. Parameters can be overridden based on the
order the are provided. Parameters appearing later in the argument list will override those defined earlier.
`,
You can combine Radius types as as well as other types that are available in Bicep such as Azure resources. See
the Radius documentation for information about describing your application and resources with Bicep.

You can specify parameters using the '--parameter' flag ('-p' for short). Parameters can be passed as:

- A file containing multiple parameters using the ARM JSON parameter format (see below)
- A file containing a single value in JSON format
- A key-value-pair passed in the command line

When passing multiple parameters in a single file, use the format described here:

https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/parameter-files

You can specify parameters using multiple sources. Parameters can be overridden based on the
order the are provided. Parameters appearing later in the argument list will override those defined earlier.
`,
Example: `
# deploy a Bicep template
rad deploy myapp.bicep
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/cmd/group/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
Short: "Delete a resource group",
Long: `Delete a resource group.

Delete a resource group if it is empty. If not empty, delete the contents and try again`,
Delete a resource group if it is empty. If not empty, delete the contents and try again`,
Example: `rad group delete rgprod`,
Args: cobra.MaximumNArgs(1),
RunE: framework.RunCommand(runner),
Expand Down
10 changes: 5 additions & 5 deletions pkg/cli/cmd/group/groupswitch/switch.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be tested locally to see how it looks.

Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
Short: "Switch default resource group scope",
Long: `Switch default resource group scope

Radius workspaces contain a resource group scope, where Radius Applications and resources are deployed by default. The switch command changes the default scope of the workspace to the specified resource group name.
Resource groups are used to organize and manage Radius resources. They often contain resources that share a common lifecycle or unit of deployment.
Note that these resource groups are separate from the Azure cloud provider and Azure resource groups configured with the cloud provider.`,
Radius workspaces contain a resource group scope, where Radius Applications and resources are deployed by default. The switch command changes the default scope of the workspace to the specified resource group name.
brooke-hamilton marked this conversation as resolved.
Show resolved Hide resolved

Resource groups are used to organize and manage Radius resources. They often contain resources that share a common lifecycle or unit of deployment.

Note that these resource groups are separate from the Azure cloud provider and Azure resource groups configured with the cloud provider.`,
Example: `rad group switch rgprod -w wsprod`,
Args: cobra.MaximumNArgs(1),
RunE: framework.RunCommand(runner),
Expand Down
10 changes: 5 additions & 5 deletions pkg/cli/cmd/group/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
Short: "List resource groups within current/specified workspace",
Long: `List resource groups within current/specified workspace

Resource groups are used to organize and manage Radius resources. They often contain resources that share a common lifecycle or unit of deployment.
A Radius Application and its resources can span one or more resource groups, and do not have to be in the same resource group as the Radius Environment into which it's being deployed into.
Note that these resource groups are separate from the Azure cloud provider and Azure resource groups configured with the cloud provider.`,
Resource groups are used to organize and manage Radius resources. They often contain resources that share a common lifecycle or unit of deployment.

A Radius Application and its resources can span one or more resource groups, and do not have to be in the same resource group as the Radius Environment into which it's being deployed into.

Note that these resource groups are separate from the Azure cloud provider and Azure resource groups configured with the cloud provider.`,
Example: `rad group list`,
Args: cobra.ExactArgs(0),
RunE: framework.RunCommand(runner),
Expand Down
8 changes: 4 additions & 4 deletions pkg/cli/cmd/resource/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
Short: "Delete a Radius resource",
Long: "Deletes a Radius resource with the given name",
Example: `
sample list of resourceType: containers, gateways, daprPubSubBrokers, extenders, mongoDatabases, rabbitMQMessageQueues, redisCaches, sqlDatabases, daprStateStores, daprSecretStores
# Delete a container named orders
rad resource delete containers orders`,
sample list of resourceType: containers, gateways, daprPubSubBrokers, extenders, mongoDatabases, rabbitMQMessageQueues, redisCaches, sqlDatabases, daprStateStores, daprSecretStores

# Delete a container named orders
rad resource delete containers orders`,
Args: cobra.ExactArgs(2),
RunE: framework.RunCommand(runner),
}
Expand Down
20 changes: 10 additions & 10 deletions pkg/cli/cmd/resource/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
Short: "Lists resources",
Long: "List all resources of specified type",
Example: `
sample list of resourceType: containers, gateways, pubSubBrokers, extenders, mongoDatabases, rabbitMQMessageQueues, redisCaches, sqlDatabases, stateStores, secretStores
sample list of resourceType: containers, gateways, pubSubBrokers, extenders, mongoDatabases, rabbitMQMessageQueues, redisCaches, sqlDatabases, stateStores, secretStores

# list all resources of a specified type in the default environment
# list all resources of a specified type in the default environment

rad resource list containers
rad resource list gateways
rad resource list containers
rad resource list gateways

# list all resources of a specified type in an application
rad resource list containers --application icecream-store
# list all resources of a specified type in an application (shorthand flag)
rad resource list containers -a icecream-store
`,
# list all resources of a specified type in an application
rad resource list containers --application icecream-store

# list all resources of a specified type in an application (shorthand flag)
rad resource list containers -a icecream-store
`,
Args: cobra.ExactArgs(1),
RunE: framework.RunCommand(runner),
}
Expand Down
20 changes: 10 additions & 10 deletions pkg/cli/cmd/resource/show/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) {
Short: "Show Radius resource details",
Long: "Show details of the specified Radius resource",
Example: `
sample list of resourceType: containers, gateways, daprPubSubBrokers, extenders, mongoDatabases, rabbitMQMessageQueues, redisCaches, sqlDatabases, daprStateStores, daprSecretStores
sample list of resourceType: containers, gateways, daprPubSubBrokers, extenders, mongoDatabases, rabbitMQMessageQueues, redisCaches, sqlDatabases, daprStateStores, daprSecretStores

# show details of a specified resource in the default environment
# show details of a specified resource in the default environment

rad resource show containers orders
rad resource show gateways orders_gateways
rad resource show containers orders
rad resource show gateways orders_gateways

# show details of a specified resource in an application
rad resource show containers orders --application icecream-store
# show details of a specified resource in an application (shorthand flag)
rad resource show containers orders -a icecream-store
`,
# show details of a specified resource in an application
rad resource show containers orders --application icecream-store

# show details of a specified resource in an application (shorthand flag)
rad resource show containers orders -a icecream-store
`,
Args: cobra.ExactArgs(2),
RunE: framework.RunCommand(runner),
}
Expand Down
Loading