Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
cloud
Merge requests
!709
Issue
#3266542
by Xiaohua Guan, yas: Create entity type availability zone (OpenStack)
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Issue
#3266542
by Xiaohua Guan, yas: Create entity type availability zone (OpenStack)
issue/cloud-3266542:3266542-create-entity-type
into
5.x
Overview
0
Commits
3
Pipelines
0
Changes
10
Merged
Issue #3266542 by Xiaohua Guan, yas: Create entity type availability zone (OpenStack)
xiaohua guan
requested to merge
issue/cloud-3266542:3266542-create-entity-type
into
5.x
Feb 25, 2022
Overview
0
Commits
3
Pipelines
0
Changes
10
Closes
#3266542
0
0
Merge request reports
Compare
5.x
version 3
c4b20bf0
Feb 26, 2022
version 2
aabab830
Feb 26, 2022
version 1
2048e2ce
Feb 25, 2022
5.x (base)
and
latest version
latest version
c4b20bf0
3 commits,
Feb 26, 2022
version 3
c4b20bf0
3 commits,
Feb 26, 2022
version 2
aabab830
2 commits,
Feb 26, 2022
version 1
2048e2ce
1 commit,
Feb 25, 2022
10 files
+
240
−
24
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
modules/cloud_service_providers/aws_cloud/src/Form/Ec2/VolumeCreateForm.php
+
4
−
6
View file @ c4b20bf0
Edit in single-file editor
Open in Web IDE
Show full file
@@ -5,7 +5,6 @@ namespace Drupal\aws_cloud\Form\Ec2;
use
Drupal\aws_cloud
\Traits\AwsCloudFormTrait
;
use
Drupal\cloud\Traits\CloudContentEntityTrait
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\openstack\Entity\OpenStackVolume
;
/**
* Form controller for the Volume entity create form.
@@ -120,11 +119,10 @@ class VolumeCreateForm extends AwsCloudContentForm {
'#required'
=>
FALSE
,
];
// @FIXME: We can remove the following code once we introduce
// AvailabilityZone entity for OpenStack.
$availability_zone_options
=
$entity
instanceof
OpenStackVolume
?
$this
->
ec2Service
->
getAvailabilityZones
()
:
$this
->
getAvailabilityZoneOptions
(
$cloud_context
);
// Get module name.
$module_name
=
$this
->
getModuleName
(
$entity
);
$availability_zone_options
=
$this
->
getAvailabilityZoneOptions
(
$cloud_context
,
$module_name
);
$form
[
'volume'
][
'availability_zone'
]
=
[
'#type'
=>
'select'
,
Loading