diff --git a/api-daemon/pvcapid/flaskapi.py b/api-daemon/pvcapid/flaskapi.py index 0e5aa1a5..31772c49 100755 --- a/api-daemon/pvcapid/flaskapi.py +++ b/api-daemon/pvcapid/flaskapi.py @@ -1046,6 +1046,9 @@ class API_VM_Root(Resource): source: type: string description: The parent network bridge on the node + vni: + type: integer + description: The VNI (PVC network) of the network bridge model: type: string description: The virtual network device model diff --git a/daemon-common/common.py b/daemon-common/common.py index 94df9507..61efa04d 100644 --- a/daemon-common/common.py +++ b/daemon-common/common.py @@ -27,6 +27,7 @@ import shlex import subprocess import kazoo.client from json import loads +from re import match as re_match from distutils.util import strtobool @@ -359,6 +360,7 @@ def getDomainNetworks(parsed_xml, stats_data): net_wr_drops = net_stats.get('wr_drops', 0) net_obj = { 'type': net_type, + 'vni': re_match(r'[vm]*br([0-9a-z]+)', net_bridge).group(1), 'mac': net_mac, 'source': net_bridge, 'model': net_model,