You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/01/14 00:37:48 UTC
[cloudstack-primate] branch master updated: Allow enabling
network/vpc offering at creation (#911)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new c8edbc3 Allow enabling network/vpc offering at creation (#911)
c8edbc3 is described below
commit c8edbc36f086f8a3882357e3aafe9be2b87f2eb7
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Thu Jan 14 06:07:42 2021 +0530
Allow enabling network/vpc offering at creation (#911)
Co-authored-by: Pearl Dsilva <pe...@shapeblue.com>
---
src/views/offering/AddNetworkOffering.vue | 12 ++++++++++++
src/views/offering/AddVpcOffering.vue | 12 ++++++++++++
2 files changed, 24 insertions(+)
diff --git a/src/views/offering/AddNetworkOffering.vue b/src/views/offering/AddNetworkOffering.vue
index ce571e1..c163f5a 100644
--- a/src/views/offering/AddNetworkOffering.vue
+++ b/src/views/offering/AddNetworkOffering.vue
@@ -447,6 +447,15 @@
</a-select-option>
</a-select>
</a-form-item>
+ <a-form-item>
+ <span slot="label">
+ {{ $t('label.enable.network.offering') }}
+ <a-tooltip :title="apiParams.enable.description">
+ <a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
+ </a-tooltip>
+ </span>
+ <a-switch v-decorator="['enable', {initialValue: false}]" />
+ </a-form-item>
</a-form>
<div :span="24" class="action-button">
<a-button @click="closeAction">{{ this.$t('label.cancel') }}</a-button>
@@ -929,6 +938,9 @@ export default {
if (zoneId) {
params.zoneid = zoneId
}
+ if (values.enable) {
+ params.enable = values.enable
+ }
params.traffictype = 'GUEST' // traffic type dropdown has been removed since it has only one option ('Guest'). Hardcode traffic type value here.
api('createNetworkOffering', params).then(json => {
this.$message.success('Network offering created: ' + values.name)
diff --git a/src/views/offering/AddVpcOffering.vue b/src/views/offering/AddVpcOffering.vue
index 082c0e3..15faab8 100644
--- a/src/views/offering/AddVpcOffering.vue
+++ b/src/views/offering/AddVpcOffering.vue
@@ -145,6 +145,15 @@
</a-select-option>
</a-select>
</a-form-item>
+ <a-form-item>
+ <span slot="label">
+ {{ $t('label.enable.vpc.offering') }}
+ <a-tooltip :title="apiParams.enable.description">
+ <a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
+ </a-tooltip>
+ </span>
+ <a-switch v-decorator="['enable', {initialValue: false}]" />
+ </a-form-item>
</a-form>
<div :span="24" class="action-button">
<a-button @click="closeAction">{{ this.$t('label.cancel') }}</a-button>
@@ -400,6 +409,9 @@ export default {
} else {
params.supportedservices = ''
}
+ if (values.enable) {
+ params.enable = values.enable
+ }
api('createVPCOffering', params).then(json => {
this.$message.success(`${this.$t('message.create.vpc.offering')}: ` + values.name)
this.$emit('refresh-data')