Skip to content
Snippets Groups Projects
Commit 0d1a336e authored by nmani's avatar nmani Committed by Yas Naoi
Browse files

Issue #3074715 by nmani, yas, baldwinlouie: Refactor the routing on each entity (AWS resources)

parent 5398bd11
No related branches found
Tags 8.x-1.0
No related merge requests found
......@@ -252,7 +252,7 @@ entity.aws_cloud_key_pair.refresh:
- view.aws_cloud_key_pair.list
entity.aws_cloud_key_pair.edit:
route_name: entity.aws_cloud_key_pair.edit_form.edit
route_name: entity.aws_cloud_key_pair.edit_form
title: 'Edit'
appears_on:
- entity.aws_cloud_key_pair.canonical
......
......@@ -168,38 +168,6 @@ aws_cloud.instance_type_prices.list_update:
perm: 'view aws cloud instance type prices'
# AWS Cloud Instances Routes
entity.aws_cloud_instance.canonical:
path: '/clouds/aws_cloud/{cloud_context}/instance/{aws_cloud_instance}'
defaults:
_entity_view: 'aws_cloud_instance'
_title: 'AWS Cloud Instance'
requirements:
_entity_access: 'aws_cloud_instance.view'
entity.aws_cloud_instance.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/instance/{aws_cloud_instance}/edit'
defaults:
_entity_form: 'aws_cloud_instance.edit'
_title: 'Edit AWS Cloud Instance'
requirements:
_entity_access: 'aws_cloud_instance.edit'
entity.aws_cloud_instance.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/instance/{aws_cloud_instance}/edit'
defaults:
_entity_form: 'aws_cloud_instance.edit'
_title: 'Edit AWS Cloud Instance'
requirements:
_entity_access: 'aws_cloud_instance.edit'
entity.aws_cloud_instance.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/instance/{aws_cloud_instance}/terminate'
defaults:
_entity_form: 'aws_cloud_instance.delete'
_title: 'Terminate AWS Cloud Instance'
requirements:
_entity_access: 'aws_cloud_instance.delete'
entity.aws_cloud_instance.stop_form:
path: '/clouds/aws_cloud/{cloud_context}/instance/{aws_cloud_instance}/stop'
defaults:
......@@ -278,14 +246,6 @@ entity.aws_cloud_instance.reboot_multiple_form:
# AWS Cloud Images Routes
entity.aws_cloud_image.canonical:
path: '/clouds/aws_cloud/{cloud_context}/image/{aws_cloud_image}'
defaults:
_entity_view: 'aws_cloud_image'
_title: 'AWS Cloud Image'
requirements:
_entity_access: 'aws_cloud_image.view'
entity.aws_cloud_image.add_form:
path: '/clouds/aws_cloud/{cloud_context}/image/add'
defaults:
......@@ -298,30 +258,6 @@ entity.aws_cloud_image.add_form:
options:
perm: 'add aws cloud image'
entity.aws_cloud_image.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/image/{aws_cloud_image}/edit'
defaults:
_entity_form: 'aws_cloud_image.edit'
_title: 'Edit AWS Cloud Image'
requirements:
_entity_access: 'aws_cloud_image.edit'
entity.aws_cloud_image.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/image/{aws_cloud_image}/edit'
defaults:
_entity_form: 'aws_cloud_image.edit'
_title: 'Edit AWS Cloud Image'
requirements:
_entity_access: 'aws_cloud_image.edit'
entity.aws_cloud_image.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/image/{aws_cloud_image}/delete'
defaults:
_entity_form: 'aws_cloud_image.delete'
_title: 'Delete AWS Cloud Image'
requirements:
_entity_access: 'aws_cloud_image.delete'
entity.aws_cloud_image.import:
path: '/clouds/aws_cloud/{cloud_context}/images/import'
defaults:
......@@ -346,14 +282,6 @@ entity.aws_cloud_image.search_images:
perm: 'add aws cloud image'
# AWS Cloud Network Interfaces Routes
entity.aws_cloud_network_interface.canonical:
path: '/clouds/aws_cloud/{cloud_context}/network_interface/{aws_cloud_network_interface}'
defaults:
_entity_view: 'aws_cloud_network_interface'
_title: 'AWS Cloud Network Interface'
requirements:
_entity_access: 'aws_cloud_network_interface.view'
entity.aws_cloud_network_interface.add_form:
path: '/clouds/aws_cloud/{cloud_context}/network_interface/add'
defaults:
......@@ -366,40 +294,7 @@ entity.aws_cloud_network_interface.add_form:
options:
perm: 'add aws cloud network interface'
entity.aws_cloud_network_interface.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/network_interface/{aws_cloud_network_interface}/edit'
defaults:
_entity_form: 'aws_cloud_network_interface.edit'
_title: 'Edit AWS Cloud Network Interface'
requirements:
_entity_access: 'aws_cloud_network_interface.edit'
entity.aws_cloud_network_interface.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/network_interface/{aws_cloud_network_interface}/edit'
defaults:
_entity_form: 'aws_cloud_network_interface.edit'
_title: 'Edit AWS Cloud Network Interface'
requirements:
_entity_access: 'aws_cloud_network_interface.edit'
entity.aws_cloud_network_interface.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/network_interface/{aws_cloud_network_interface}/delete'
defaults:
_entity_form: 'aws_cloud_network_interface.delete'
_title: 'Delete AWS Cloud Network Interface'
requirements:
_entity_access: 'aws_cloud_network_interface.delete'
# AWS Cloud Elastic IP Routes
entity.aws_cloud_elastic_ip.canonical:
path: '/clouds/aws_cloud/{cloud_context}/elastic_ip/{aws_cloud_elastic_ip}'
defaults:
_entity_view: 'aws_cloud_elastic_ip'
_title: 'AWS Cloud Elastic IP'
requirements:
_entity_access: 'aws_cloud_elastic_ip.view'
entity.aws_cloud_elastic_ip.add_form:
path: '/clouds/aws_cloud/{cloud_context}/elastic_ip/add'
defaults:
......@@ -412,30 +307,6 @@ entity.aws_cloud_elastic_ip.add_form:
options:
perm: 'add aws cloud elastic ip'
entity.aws_cloud_elastic_ip.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/elastic_ip/{aws_cloud_elastic_ip}/edit'
defaults:
_entity_form: 'aws_cloud_elastic_ip.edit'
_title: 'Edit AWS Cloud Elastic IP'
requirements:
_entity_access: 'aws_cloud_elastic_ip.edit'
entity.aws_cloud_elastic_ip.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/elastic_ip/{aws_cloud_elastic_ip}/edit'
defaults:
_entity_form: 'aws_cloud_elastic_ip.edit'
_title: 'Edit AWS Cloud Elastic IP'
requirements:
_entity_access: 'aws_cloud_elastic_ip.edit'
entity.aws_cloud_elastic_ip.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/elastic_ip/{aws_cloud_elastic_ip}/delete'
defaults:
_entity_form: 'aws_cloud_elastic_ip.delete'
_title: 'Delete AWS Cloud Elastic IP'
requirements:
_entity_access: 'aws_cloud_elastic_ip.delete'
entity.aws_cloud_elastic_ip.associate_form:
path: '/clouds/aws_cloud/{cloud_context}/elastic_ip/{aws_cloud_elastic_ip}/associate'
defaults:
......@@ -466,14 +337,6 @@ entity.aws_cloud_elastic_ip.disassociate_multiple_form:
# AWS Cloud Security Groups Routes
entity.aws_cloud_security_group.canonical:
path: '/clouds/aws_cloud/{cloud_context}/security_group/{aws_cloud_security_group}'
defaults:
_entity_view: 'aws_cloud_security_group'
_title: 'AWS Cloud Security Group'
requirements:
_entity_access: 'aws_cloud_security_group.view'
entity.aws_cloud_security_group.add_form:
path: '/clouds/aws_cloud/{cloud_context}/security_group/add'
defaults:
......@@ -486,30 +349,6 @@ entity.aws_cloud_security_group.add_form:
options:
perm: 'add aws cloud security group'
entity.aws_cloud_security_group.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/security_group/{aws_cloud_security_group}/edit'
defaults:
_entity_form: 'aws_cloud_security_group.edit'
_title: 'Edit AWS Cloud Security Group'
requirements:
_entity_access: 'aws_cloud_security_group.edit'
entity.aws_cloud_security_group.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/security_group/{aws_cloud_security_group}/edit'
defaults:
_entity_form: 'aws_cloud_security_group.edit'
_title: 'Edit AWS Cloud Security Group'
requirements:
_entity_access: 'aws_cloud_security_group.edit'
entity.aws_cloud_security_group.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/security_group/{aws_cloud_security_group}/delete'
defaults:
_entity_form: 'aws_cloud_security_group.delete'
_title: 'Delete AWS Cloud Security Group'
requirements:
_entity_access: 'aws_cloud_security_group.delete'
entity.aws_cloud_security_group.revoke_form:
path: '/clouds/aws_cloud/{cloud_context}/security_group/{aws_cloud_security_group}/revoke'
defaults:
......@@ -530,16 +369,7 @@ entity.aws_cloud_security_group.copy_form:
options:
perm: 'add aws cloud security group'
# AWS Cloud Key Pairs Routes
entity.aws_cloud_key_pair.canonical:
path: '/clouds/aws_cloud/{cloud_context}/key_pair/{aws_cloud_key_pair}'
defaults:
_entity_view: 'aws_cloud_key_pair'
_title: 'AWS Cloud Key Pair'
requirements:
_entity_access: 'aws_cloud_key_pair.view'
entity.aws_cloud_key_pair.download:
path: '/clouds/aws_cloud/{cloud_context}/key_pair/{aws_cloud_key_pair}/download'
defaults:
......@@ -576,40 +406,7 @@ entity.aws_cloud_key_pair.import_form:
options:
perm: 'add aws cloud key pair'
entity.aws_cloud_key_pair.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/key_pair/{aws_cloud_key_pair}/edit'
defaults:
_entity_form: 'aws_cloud_key_pair.edit'
_title: 'Edit AWS Cloud Key Pair'
requirements:
_entity_access: 'aws_cloud_key_pair.edit'
entity.aws_cloud_key_pair.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/key_pair/{aws_cloud_key_pair}/edit'
defaults:
_entity_form: 'aws_cloud_key_pair.edit'
_title: 'Edit AWS Cloud Key Pair'
requirements:
_entity_access: 'aws_cloud_key_pair.edit'
entity.aws_cloud_key_pair.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/key_pair/{aws_cloud_key_pair}/delete'
defaults:
_entity_form: 'aws_cloud_key_pair.delete'
_title: 'Delete AWS Cloud Key Pair'
requirements:
_entity_access: 'aws_cloud_key_pair.delete'
# AWS Cloud Volume Routes
entity.aws_cloud_volume.canonical:
path: '/clouds/aws_cloud/{cloud_context}/volume/{aws_cloud_volume}'
defaults:
_entity_view: 'aws_cloud_volume'
_title: 'AWS Cloud Volume'
requirements:
_entity_access: 'aws_cloud_volume.view'
entity.aws_cloud_volume.add_form:
path: '/clouds/aws_cloud/{cloud_context}/volume/add'
defaults:
......@@ -622,30 +419,6 @@ entity.aws_cloud_volume.add_form:
options:
perm: 'add aws cloud volume'
entity.aws_cloud_volume.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/volume/{aws_cloud_volume}/edit'
defaults:
_entity_form: 'aws_cloud_volume.edit'
_title: 'Edit AWS Cloud Volume'
requirements:
_entity_access: 'aws_cloud_volume.edit'
entity.aws_cloud_volume.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/volume/{aws_cloud_volume}/edit'
defaults:
_entity_form: 'aws_cloud_volume.edit'
_title: 'Edit AWS Cloud Volume'
requirements:
_entity_access: 'aws_cloud_volume.edit'
entity.aws_cloud_volume.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/volume/{aws_cloud_volume}/delete'
defaults:
_entity_form: 'aws_cloud_volume.delete'
_title: 'Delete AWS Cloud Volume'
requirements:
_entity_access: 'aws_cloud_volume.delete'
entity.aws_cloud_volume.attach_form:
path: '/clouds/aws_cloud/{cloud_context}/volume/{aws_cloud_volume}/attach'
defaults:
......@@ -664,14 +437,6 @@ entity.aws_cloud_volume.detach_form:
# AWS Cloud Snapshots Routes
entity.aws_cloud_snapshot.canonical:
path: '/clouds/aws_cloud/{cloud_context}/snapshot/{aws_cloud_snapshot}'
defaults:
_entity_view: 'aws_cloud_snapshot'
_title: 'AWS Cloud Snapshot'
requirements:
_entity_access: 'aws_cloud_snapshot.view'
entity.aws_cloud_snapshot.add_form:
path: '/clouds/aws_cloud/{cloud_context}/snapshot/add'
defaults:
......@@ -684,22 +449,6 @@ entity.aws_cloud_snapshot.add_form:
options:
perm: 'add aws cloud snapshot'
entity.aws_cloud_snapshot.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/snapshot/{aws_cloud_snapshot}/edit'
defaults:
_entity_form: 'aws_cloud_snapshot.edit'
_title: 'Edit AWS Cloud Snapshot'
requirements:
_entity_access: 'aws_cloud_snapshot.edit'
entity.aws_cloud_snapshot.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/snapshot/{aws_cloud_snapshot}/edit'
defaults:
_entity_form: 'aws_cloud_snapshot.edit'
_title: 'Edit AWS Cloud Snapshot'
requirements:
_entity_access: 'aws_cloud_snapshot.edit'
entity.aws_cloud_snapshot.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/snapshot/{aws_cloud_snapshot}/delete'
defaults:
......@@ -710,14 +459,6 @@ entity.aws_cloud_snapshot.delete_form:
# AWS Cloud VPCs Routes
entity.aws_cloud_vpc.canonical:
path: '/clouds/aws_cloud/{cloud_context}/vpc/{aws_cloud_vpc}'
defaults:
_entity_view: 'aws_cloud_vpc'
_title: 'AWS Cloud VPC'
requirements:
_entity_access: 'aws_cloud_vpc.view'
entity.aws_cloud_vpc.add_form:
path: '/clouds/aws_cloud/{cloud_context}/vpc/add'
defaults:
......@@ -730,40 +471,7 @@ entity.aws_cloud_vpc.add_form:
options:
perm: 'add aws cloud vpc'
entity.aws_cloud_vpc.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/vpc/{aws_cloud_vpc}/edit'
defaults:
_entity_form: 'aws_cloud_vpc.edit'
_title: 'Edit AWS Cloud VPC'
requirements:
_entity_access: 'aws_cloud_vpc.edit'
entity.aws_cloud_vpc.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/vpc/{aws_cloud_vpc}/edit'
defaults:
_entity_form: 'aws_cloud_vpc.edit'
_title: 'Edit AWS Cloud VPC'
requirements:
_entity_access: 'aws_cloud_vpc.edit'
entity.aws_cloud_vpc.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/vpc/{aws_cloud_vpc}/delete'
defaults:
_entity_form: 'aws_cloud_vpc.delete'
_title: 'Delete AWS Cloud VPC'
requirements:
_entity_access: 'aws_cloud_vpc.delete'
# AWS Cloud Subnets Routes
entity.aws_cloud_subnet.canonical:
path: '/clouds/aws_cloud/{cloud_context}/subnet/{aws_cloud_subnet}'
defaults:
_entity_view: 'aws_cloud_subnet'
_title: 'AWS Cloud Subnet'
requirements:
_entity_access: 'aws_cloud_subnet.view'
entity.aws_cloud_subnet.add_form:
path: '/clouds/aws_cloud/{cloud_context}/subnet/add'
defaults:
......@@ -776,31 +484,6 @@ entity.aws_cloud_subnet.add_form:
options:
perm: 'add aws cloud subnet'
entity.aws_cloud_subnet.edit_form:
path: '/clouds/aws_cloud/{cloud_context}/subnet/{aws_cloud_subnet}/edit'
defaults:
_entity_form: 'aws_cloud_subnet.edit'
_title: 'Edit AWS Cloud Subnet'
requirements:
_entity_access: 'aws_cloud_subnet.edit'
entity.aws_cloud_subnet.edit_form.edit:
path: '/clouds/aws_cloud/{cloud_context}/subnet/{aws_cloud_subnet}/edit'
defaults:
_entity_form: 'aws_cloud_subnet.edit'
_title: 'Edit AWS Cloud Subnet'
requirements:
_entity_access: 'aws_cloud_subnet.edit'
entity.aws_cloud_subnet.delete_form:
path: '/clouds/aws_cloud/{cloud_context}/subnet/{aws_cloud_subnet}/delete'
defaults:
_entity_form: 'aws_cloud_subnet.delete'
_title: 'Delete AWS Cloud Subnet'
requirements:
_entity_access: 'aws_cloud_subnet.delete'
entity.aws_cloud_instance.list_callback:
path: '/clouds/aws_cloud/{cloud_context}/instance/callback'
defaults:
......
......@@ -39,9 +39,9 @@ use Drupal\Core\Field\BaseFieldDefinition;
* "uuid" = "uuid"
* },
* links = {
* "canonical" = "/view.aws_cloud_image.list" ,
* "edit-form" = "/entity.aws_cloud_image.edit_form" ,
* "delete-form" = "/entity.aws_cloud_image.delete_form",
* "canonical" = "/clouds/aws_cloud/{cloud_context}/image/{aws_cloud_image}",
* "edit-form" = "/clouds/aws_cloud/{cloud_context}/image/{aws_cloud_image}/edit",
* "delete-form" = "/clouds/aws_cloud/{cloud_context}/image/{aws_cloud_image}/delete",
* "collection" = "/clouds/aws_cloud/{cloud_context}/image",
* "delete-multiple-form" = "/clouds/aws_cloud/{cloud_context}/image/delete_multiple",
* },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment