mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.18' into 4.19
This commit is contained in:
commit
5745674da5
2
.github/workflows/codecov.yml
vendored
2
.github/workflows/codecov.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
|||||||
cd nonoss && bash -x install-non-oss.sh && cd ..
|
cd nonoss && bash -x install-non-oss.sh && cd ..
|
||||||
mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc)
|
mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc)
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v3
|
- uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
files: ./client/target/site/jacoco-aggregate/jacoco.xml
|
files: ./client/target/site/jacoco-aggregate/jacoco.xml
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
|||||||
@ -127,7 +127,7 @@ class CsDhcp(CsDataBag):
|
|||||||
line = "dhcp-option=%s,26,%s" % (device, i['mtu'])
|
line = "dhcp-option=%s,26,%s" % (device, i['mtu'])
|
||||||
self.conf.search(sline, line)
|
self.conf.search(sline, line)
|
||||||
|
|
||||||
# Netmask
|
# Netmask
|
||||||
netmask = ''
|
netmask = ''
|
||||||
if self.config.is_vpc():
|
if self.config.is_vpc():
|
||||||
netmask = gn.get_netmask()
|
netmask = gn.get_netmask()
|
||||||
|
|||||||
@ -113,22 +113,20 @@ def bool_to_yn(val):
|
|||||||
def get_device_info():
|
def get_device_info():
|
||||||
""" Returns all devices on system with their ipv4 ip netmask """
|
""" Returns all devices on system with their ipv4 ip netmask """
|
||||||
list = []
|
list = []
|
||||||
|
mtu = None
|
||||||
for i in execute("ip addr show |grep -v secondary"):
|
for i in execute("ip addr show |grep -v secondary"):
|
||||||
vals = i.strip().lstrip().rstrip().split()
|
vals = i.strip().lstrip().rstrip().split()
|
||||||
if re.search('[0-9]:',vals[0]):
|
if re.search('[0-9]:', vals[0]):
|
||||||
to={}
|
mtu = vals[4]
|
||||||
to['mtu'] = vals[4]
|
|
||||||
list.append(to)
|
|
||||||
|
|
||||||
if vals[0] == "inet":
|
if vals[0] == "inet":
|
||||||
if len(list) > 0:
|
to = {}
|
||||||
to = list.pop(len(list)-1)
|
|
||||||
else:
|
|
||||||
to={}
|
|
||||||
to['ip'] = vals[1]
|
to['ip'] = vals[1]
|
||||||
to['dev'] = vals[-1]
|
to['dev'] = vals[-1]
|
||||||
to['network'] = IPNetwork(to['ip'])
|
to['network'] = IPNetwork(to['ip'])
|
||||||
to['dnsmasq'] = False
|
to['dnsmasq'] = False
|
||||||
|
if mtu:
|
||||||
|
to['mtu'] = mtu
|
||||||
list.append(to)
|
list.append(to)
|
||||||
return list
|
return list
|
||||||
|
|
||||||
|
|||||||
@ -263,7 +263,7 @@ export default {
|
|||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
} else if (!this.ipV4Regex.test(value)) {
|
} else if (!this.ipV4Regex.test(value)) {
|
||||||
return Promise.reject(this.$t('message.error.ipv4.address'))
|
return Promise.reject(this.$t('message.error.ipv4.address'))
|
||||||
} else if (rule.networkType !== 'L2' && !this.isIp4InCidr(value, rule.cidr)) {
|
} else if (rule.networkType === 'Isolated' && !this.isIp4InCidr(value, rule.cidr)) {
|
||||||
const rangeIps = this.calculateCidrRange(rule.cidr)
|
const rangeIps = this.calculateCidrRange(rule.cidr)
|
||||||
const message = `${this.$t('message.error.ip.range')} ${this.$t('label.from')} ${rangeIps[0]} ${this.$t('label.to')} ${rangeIps[1]}`
|
const message = `${this.$t('message.error.ip.range')} ${this.$t('label.from')} ${rangeIps[0]} ${this.$t('label.to')} ${rangeIps[1]}`
|
||||||
return Promise.reject(message)
|
return Promise.reject(message)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user