Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/entity_form_template.ts +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import OPENSTACK_INSTANCE_TEMPLATE from 'constant/form_template/openstack/instan import OPENSTACK_FLOATING_IP_TEMPLATE from 'constant/form_template/openstack/floating_ip'; import OPENSTACK_KEY_PAIR_TEMPLATE from 'constant/form_template/openstack/key_pair'; import OPENSTACK_NETWORK_INTERFACE_TEMPLATE from 'constant/form_template/openstack/network_interface'; import OPENSTACK_SECURITY_GROUP_TEMPLATE from 'constant/form_template/openstack/security_group'; import VMWARE_VM_TEMPLATE from 'constant/form_template/vmware/vm'; const ENTITY_FORM_LIST = [ Loading @@ -20,6 +21,7 @@ const ENTITY_FORM_LIST = [ ...OPENSTACK_FLOATING_IP_TEMPLATE, ...OPENSTACK_INSTANCE_TEMPLATE, ...OPENSTACK_IMAGE_TEMPLATE, ...OPENSTACK_SECURITY_GROUP_TEMPLATE, ...OPENSTACK_KEY_PAIR_TEMPLATE, ...OPENSTACK_NETWORK_INTERFACE_TEMPLATE, ...VMWARE_VM_TEMPLATE, Loading modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/openstack/security_group.ts 0 → 100644 +21 −0 Original line number Diff line number Diff line import EntityFormTemplate from 'model/EntityFormTemplate'; const OPENSTACK_SECURITY_GROUP_TEMPLATE: EntityFormTemplate[] = [ { cloudServiceProvider: 'openstack', entityName: 'security_group', actionType: 'create', entityRecords: [ { type: 'panel', panelName: 'Security group', keyValueRecords: [ { type: 'default', labelName: 'Security group name', name: 'group_name', defaultValue: '', required: true }, { type: 'default', labelName: 'Description', name: 'description', defaultValue: '', required: true }, ] } ] }, ] export default OPENSTACK_SECURITY_GROUP_TEMPLATE; modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/SecurityGroup.php +14 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,13 @@ class SecurityGroup extends CloudContentEntityBase implements SecurityGroupInter return $this->get('group_name')->value; } /** * {@inheritdoc} */ public function setGroupName($group_name = ''): SecurityGroupInterface { return $this->set('group_name', $group_name); } /** * {@inheritdoc} */ Loading @@ -91,6 +98,13 @@ class SecurityGroup extends CloudContentEntityBase implements SecurityGroupInter return $this->get('description')->value; } /** * {@inheritdoc} */ public function setDescription($description = ''): SecurityGroupInterface { return $this->set('description', $description); } /** * {@inheritdoc} */ Loading modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/SecurityGroupInterface.php +10 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ interface SecurityGroupInterface extends ContentEntityInterface, EntityOwnerInte */ public function getDescription(): ?string; /** * {@inheritdoc} */ public function setDescription($description = ''): SecurityGroupInterface; /** * {@inheritdoc} */ Loading @@ -38,6 +43,11 @@ interface SecurityGroupInterface extends ContentEntityInterface, EntityOwnerInte */ public function getGroupName(): ?string; /** * {@inheritdoc} */ public function setGroupName($group_name = ''): SecurityGroupInterface; /** * {@inheritdoc} */ Loading modules/cloud_service_providers/openstack/openstack.routing.yml +15 −0 Original line number Diff line number Diff line Loading @@ -694,3 +694,18 @@ entity.openstack_floating_ip.edit: _custom_access: '\Drupal\cloud\Controller\CloudConfigController::access' options: perm: 'edit any openstack floating ip+edit own openstack floating ip' entity.openstack_security_group.create: path: '/cloud_dashboard/openstack/{cloud_context}/openstack_security_group/create' defaults: _controller: '\Drupal\openstack\Controller\ApiController::operateEntity' entity_type_id: openstack_security_group entity_id: '' command: create methods: [POST] requirements: # Use custom access that will check for cloud_context and the desired permission. # Desired permission is passed as an option in the "perm" variable _custom_access: '\Drupal\cloud\Controller\CloudConfigController::access' options: perm: 'add openstack security group' Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/entity_form_template.ts +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import OPENSTACK_INSTANCE_TEMPLATE from 'constant/form_template/openstack/instan import OPENSTACK_FLOATING_IP_TEMPLATE from 'constant/form_template/openstack/floating_ip'; import OPENSTACK_KEY_PAIR_TEMPLATE from 'constant/form_template/openstack/key_pair'; import OPENSTACK_NETWORK_INTERFACE_TEMPLATE from 'constant/form_template/openstack/network_interface'; import OPENSTACK_SECURITY_GROUP_TEMPLATE from 'constant/form_template/openstack/security_group'; import VMWARE_VM_TEMPLATE from 'constant/form_template/vmware/vm'; const ENTITY_FORM_LIST = [ Loading @@ -20,6 +21,7 @@ const ENTITY_FORM_LIST = [ ...OPENSTACK_FLOATING_IP_TEMPLATE, ...OPENSTACK_INSTANCE_TEMPLATE, ...OPENSTACK_IMAGE_TEMPLATE, ...OPENSTACK_SECURITY_GROUP_TEMPLATE, ...OPENSTACK_KEY_PAIR_TEMPLATE, ...OPENSTACK_NETWORK_INTERFACE_TEMPLATE, ...VMWARE_VM_TEMPLATE, Loading
modules/cloud_dashboard/cloud_dashboard/src/constant/form_template/openstack/security_group.ts 0 → 100644 +21 −0 Original line number Diff line number Diff line import EntityFormTemplate from 'model/EntityFormTemplate'; const OPENSTACK_SECURITY_GROUP_TEMPLATE: EntityFormTemplate[] = [ { cloudServiceProvider: 'openstack', entityName: 'security_group', actionType: 'create', entityRecords: [ { type: 'panel', panelName: 'Security group', keyValueRecords: [ { type: 'default', labelName: 'Security group name', name: 'group_name', defaultValue: '', required: true }, { type: 'default', labelName: 'Description', name: 'description', defaultValue: '', required: true }, ] } ] }, ] export default OPENSTACK_SECURITY_GROUP_TEMPLATE;
modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/SecurityGroup.php +14 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,13 @@ class SecurityGroup extends CloudContentEntityBase implements SecurityGroupInter return $this->get('group_name')->value; } /** * {@inheritdoc} */ public function setGroupName($group_name = ''): SecurityGroupInterface { return $this->set('group_name', $group_name); } /** * {@inheritdoc} */ Loading @@ -91,6 +98,13 @@ class SecurityGroup extends CloudContentEntityBase implements SecurityGroupInter return $this->get('description')->value; } /** * {@inheritdoc} */ public function setDescription($description = ''): SecurityGroupInterface { return $this->set('description', $description); } /** * {@inheritdoc} */ Loading
modules/cloud_service_providers/aws_cloud/src/Entity/Ec2/SecurityGroupInterface.php +10 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ interface SecurityGroupInterface extends ContentEntityInterface, EntityOwnerInte */ public function getDescription(): ?string; /** * {@inheritdoc} */ public function setDescription($description = ''): SecurityGroupInterface; /** * {@inheritdoc} */ Loading @@ -38,6 +43,11 @@ interface SecurityGroupInterface extends ContentEntityInterface, EntityOwnerInte */ public function getGroupName(): ?string; /** * {@inheritdoc} */ public function setGroupName($group_name = ''): SecurityGroupInterface; /** * {@inheritdoc} */ Loading
modules/cloud_service_providers/openstack/openstack.routing.yml +15 −0 Original line number Diff line number Diff line Loading @@ -694,3 +694,18 @@ entity.openstack_floating_ip.edit: _custom_access: '\Drupal\cloud\Controller\CloudConfigController::access' options: perm: 'edit any openstack floating ip+edit own openstack floating ip' entity.openstack_security_group.create: path: '/cloud_dashboard/openstack/{cloud_context}/openstack_security_group/create' defaults: _controller: '\Drupal\openstack\Controller\ApiController::operateEntity' entity_type_id: openstack_security_group entity_id: '' command: create methods: [POST] requirements: # Use custom access that will check for cloud_context and the desired permission. # Desired permission is passed as an option in the "perm" variable _custom_access: '\Drupal\cloud\Controller\CloudConfigController::access' options: perm: 'add openstack security group'