Skip to content

Commit b4fcb44

Browse files
committed
feat: add -p short flag for --path on add/remove-route-policy
1 parent dbccb8c commit b4fcb44

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

command/v7/add_route_policy_command.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ type AddRoutePolicyCommand struct {
1212
BaseCommand
1313

1414
RequiredArgs flag.RoutePolicyArgs `positional-args:"yes"`
15-
Hostname string `long:"hostname" short:"n" required:"true" description:"Hostname for the route"`
16-
Path string `long:"path" description:"Path for the route"`
15+
Hostname string `long:"hostname" short:"n" required:"true" description:"Hostname for the route"`
16+
Path string `long:"path" short:"p" description:"Path for the route"`
1717
RoutePolicySourceFlags
1818

1919
usage interface{} `usage:"CF_NAME add-route-policy DOMAIN --hostname HOSTNAME [--source-app APP_NAME [--source-space SPACE_NAME] [--source-org ORG_NAME] | --source-space SPACE_NAME [--source-org ORG_NAME] | --source-org ORG_NAME | --source-any | --source SOURCE] [--path PATH]\n\nALLOW ACCESS TO A ROUTE:\n Create a route policy that allows specific apps, spaces, or orgs to access a route using mTLS authentication.\n\nEXAMPLES:\n # Allow the \"frontend-app\" (in current space) to access the backend route\n cf add-route-policy apps.identity --source-app frontend-app --hostname backend\n\n # Allow an app in a different space to access the route\n cf add-route-policy apps.identity --source-app api-client --source-space other-space --hostname backend\n\n # Allow an app in a different org to access the route\n cf add-route-policy apps.identity --source-app external-client --source-space external-space --source-org external-org --hostname backend\n\n # Allow all apps in the \"monitoring\" space to access the API metrics endpoint\n cf add-route-policy apps.identity --source-space monitoring --hostname api --path /metrics\n\n # Allow all apps in a space in a different org\n cf add-route-policy apps.identity --source-space prod-space --source-org prod-org --hostname api\n\n # Allow all apps in the \"platform\" org to access the route\n cf add-route-policy apps.identity --source-org platform --hostname shared-api\n\n # Allow any authenticated app to access the public API\n cf add-route-policy apps.identity --source-any --hostname public-api\n\n # Use raw source (advanced)\n cf add-route-policy apps.identity --source cf:app:d76446a1-f429-4444-8797-be2f78b75b08 --hostname backend"`

command/v7/remove_route_policy_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type RemoveRoutePolicyCommand struct {
1212
RequiredArgs flag.RoutePolicyArgs `positional-args:"yes"`
1313
RoutePolicySourceFlags
1414
Hostname string `long:"hostname" short:"n" required:"true" description:"Hostname for the route"`
15-
Path string `long:"path" description:"Path for the route"`
15+
Path string `long:"path" short:"p" description:"Path for the route"`
1616
Force bool `short:"f" description:"Force deletion without confirmation"`
1717

1818
usage interface{} `usage:"CF_NAME remove-route-policy DOMAIN --hostname HOSTNAME [--source-app APP_NAME [--source-space SPACE_NAME] [--source-org ORG_NAME] | --source-space SPACE_NAME [--source-org ORG_NAME] | --source-org ORG_NAME | --source-any | --source SOURCE] [--path PATH] [-f]\n\nEXAMPLES:\n # Remove by app name (mirrors add-route-policy)\n cf remove-route-policy apps.identity --source-app frontend-app --hostname backend\n\n # Remove by app in a different space\n cf remove-route-policy apps.identity --source-app api-client --source-space other-space --hostname backend\n\n # Remove a space-level policy\n cf remove-route-policy apps.identity --source-space monitoring --hostname api --path /metrics -f\n\n # Remove an org-level policy\n cf remove-route-policy apps.identity --source-org platform --hostname shared-api -f\n\n # Remove using raw source (advanced)\n cf remove-route-policy apps.identity --source cf:app:d76446a1-f429-4444-8797-be2f78b75b08 --hostname backend\n cf remove-route-policy apps.identity --source cf:any --hostname public-api -f"`

0 commit comments

Comments
 (0)