mirror of https://github.com/apache/cloudstack.git
network: Add bypassvlanoverlapcheck parameter when create private gateway (#431)
Fixes #403 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
d857979b9e
commit
71fbb6b84a
|
|
@ -286,7 +286,13 @@ export default {
|
|||
icon: 'plus',
|
||||
label: 'label.add.private.gateway',
|
||||
listView: true,
|
||||
args: ['physicalnetworkid', 'vlan', 'ipaddress', 'gateway', 'netmask', 'sourcenatsupported', 'aclid'],
|
||||
args: (record, store) => {
|
||||
var fields = ['vpcid', 'physicalnetworkid', 'vlan', 'ipaddress', 'gateway', 'netmask', 'sourcenatsupported', 'aclid']
|
||||
if (store.apis.createPrivateGateway.params.filter(x => x.name === 'bypassvlanoverlapcheck').length > 0) {
|
||||
fields.push('bypassvlanoverlapcheck')
|
||||
}
|
||||
return fields
|
||||
},
|
||||
mapping: {
|
||||
aclid: {
|
||||
api: 'listNetworkACLLists'
|
||||
|
|
|
|||
|
|
@ -130,6 +130,13 @@
|
|||
v-decorator="['vlan', {rules: [{ required: true, message: `${this.$t('label.required')}` }]}]"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
:label="$t('label.bypassvlanoverlapcheck')"
|
||||
v-if="$store.getters.apis.createPrivateGateway.params.filter(x => x.name === 'bypassvlanoverlapcheck').length > 0" >
|
||||
<a-checkbox
|
||||
v-decorator="['bypassvlanoverlapcheck']"
|
||||
></a-checkbox>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('label.publicip')" :required="true">
|
||||
<a-input
|
||||
:placeholder="placeholders.ipaddress"
|
||||
|
|
@ -527,8 +534,7 @@ export default {
|
|||
}
|
||||
|
||||
const data = this.gatewayForm.getFieldsValue()
|
||||
|
||||
api('createPrivateGateway', {
|
||||
const params = {
|
||||
sourcenatsupported: data.nat,
|
||||
physicalnetworkid: data.physicalnetwork,
|
||||
vpcid: this.resource.id,
|
||||
|
|
@ -537,7 +543,12 @@ export default {
|
|||
netmask: data.netmask,
|
||||
vlan: data.vlan,
|
||||
aclid: data.acl
|
||||
}).then(response => {
|
||||
}
|
||||
if (data.bypassvlanoverlapcheck) {
|
||||
params.bypassvlanoverlapcheck = data.bypassvlanoverlapcheck
|
||||
}
|
||||
|
||||
api('createPrivateGateway', params).then(response => {
|
||||
this.$store.dispatch('AddAsyncJob', {
|
||||
title: `Successfully added Private Gateway`,
|
||||
jobid: response.createprivategatewayresponse.jobid,
|
||||
|
|
|
|||
Loading…
Reference in New Issue