diff options
author | zhangab <zhanganbing@chinamobile.com> | 2018-10-23 11:32:03 +0800 |
---|---|---|
committer | zhangab <zhanganbing@chinamobile.com> | 2018-10-23 11:32:05 +0800 |
commit | de9d2e95b43991fccee342ebed03b006f6fed844 (patch) | |
tree | 0667c51a30fd3fed71fec797136d8adefc7d7baf | |
parent | 101e5e37f4ece60af8d08020c7e4bd8f473adce7 (diff) |
Build AngularJs component for usecase-ui
Change-Id: I393f4837fc5f9cbd71448dbf20e1f1781f0656d3
Issue-ID: USECASEUI-154
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
-rw-r--r-- | distribution/pom.xml | 8 | ||||
-rw-r--r-- | pom.xml | 3 | ||||
-rw-r--r-- | usecaseui-portal/.angular-cli.json | 63 | ||||
-rw-r--r-- | usecaseui-portal/e2e/app.e2e-spec.ts | 14 | ||||
-rw-r--r-- | usecaseui-portal/e2e/app.po.ts | 11 | ||||
-rw-r--r-- | usecaseui-portal/e2e/tsconfig.e2e.json | 14 | ||||
-rw-r--r-- | usecaseui-portal/package-lock.json | 12678 | ||||
-rw-r--r-- | usecaseui-portal/package.json | 55 | ||||
-rw-r--r-- | usecaseui-portal/pom.xml | 105 | ||||
-rw-r--r-- | usecaseui-portal/src/app/alarm/alarm.component.css | 138 | ||||
-rw-r--r-- | usecaseui-portal/src/app/alarm/alarm.component.html | 113 | ||||
-rw-r--r-- | usecaseui-portal/src/app/alarm/alarm.component.less | 132 | ||||
-rw-r--r-- | usecaseui-portal/src/app/alarm/alarm.component.spec.ts | 25 | ||||
-rw-r--r-- | usecaseui-portal/src/app/alarm/alarm.component.ts | 380 | ||||
-rw-r--r-- | usecaseui-portal/src/app/animates.ts | 42 | ||||
-rw-r--r-- | usecaseui-portal/src/app/app-routing.module.ts | 41 | ||||
-rw-r--r-- | usecaseui-portal/src/app/app.component.css | 39 | ||||
-rw-r--r-- | usecaseui-portal/src/app/app.component.html | 80 | ||||
-rw-r--r-- | usecaseui-portal/src/app/app.component.less
@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
}
#!/usr/bin/env python
import requests
import json
import sys
from datetime import datetime
import csar_parser
import logging
import base64
class Preload:
def __init__(self, vcpecommon):
self.logger = logging.getLogger(__name__)
self.logger.setLevel(logging.DEBUG)
self.vcpecommon = vcpecommon
def replace(self, sz, replace_dict):
for old_string, new_string in replace_dict.items():
sz = sz.replace(old_string, new_string)
if self.vcpecommon.template_variable_symbol in sz:
self.logger.error('Error! Cannot find a value to replace ' + sz)
return sz
def generate_json(self, template_file, replace_dict):
with open(template_file) as json_input:
json_data = json.load(json_input)
stk = [json_data]
while stk:
data = stk.pop()
for k, v in data.items():
if type(v) is dict:
stk.append(v)
elif type(v) is list:
stk.extend(v)
elif type(v) is str or type(v) is unicode: # pylint: disable=E0602
if self.vcpecommon.template_variable_symbol in v:
data[k] = self.replace(v, replace_dict)
else:
self.logger.warning('Unexpected line in template: %s. Look for value %s', template_file, v)
return json_data
def reset_sniro(self):
self.logger.debug('Clearing SNIRO data')
r = requests.post(self.vcpecommon.sniro_url + '/reset', headers=self.vcpecommon.sniro_headers)
if 2 != r.status_code / 100:
self.logger.debug(r.content)
self.logger.error('Clearing SNIRO date failed.')
sys.exit(1)
def preload_sniro(self, template_sniro_data, template_sniro_request, tunnelxconn_ar_name, vgw_name, vbrg_ar_name,
vgmux_svc_instance_uuid, vbrg_svc_instance_uuid):
self.reset_sniro()
self.logger.info('Preloading SNIRO for homing service')
replace_dict = {'${tunnelxconn_ar_name}': tunnelxconn_ar_name,
'${vgw_name}': vgw_name,
'${brg_ar_name}': vbrg_ar_name,
'${vgmux_svc_instance_uuid}': vgmux_svc_instance_uuid,
'${vbrg_svc_instance_uuid}': vbrg_svc_instance_uuid
}
sniro_data = self.generate_json(template_sniro_data, replace_dict)
self.logger.debug('SNIRO data:')
self.logger.debug(json.dumps(sniro_data, indent=4, sort_keys=True))
base64_sniro_data = base64.b64encode(json.dumps(sniro_data))
self.logger.debug('SNIRO data: 64')
self.logger.debug(base64_sniro_data)
replace_dict = {'${base64_sniro_data}': base64_sniro_data, '${sniro_ip}': self.vcpecommon.hosts['robot']}
sniro_request = self.generate_json(template_sniro_request, replace_dict)
self.logger.debug('SNIRO request:')
self.logger.debug(json.dumps(sniro_request, indent=4, sort_keys=True))
r = requests.post(self.vcpecommon.sniro_url, headers=self.vcpecommon.sniro_headers, json=sniro_request)
if 2 != r.status_code / 100:
response = r.json()
self.logger.debug(json.dumps(response, indent=4, sort_keys=True))
self.logger.error('SNIRO preloading failed.')
sys.exit(1)
return True
def preload_network(self, template_file, network_role, subnet_start_ip, subnet_gateway, common_dict, name_suffix):
"""
:param template_file:
:param network_role: cpe_signal, cpe_public, brg_bng, bng_mux, mux_gw
:param subnet_start_ip:
:param subnet_gateway:
:param name_suffix: e.g. '201711201311'
:return:
"""
network_name = '_'.join([self.vcpecommon.instance_name_prefix['network'], network_role.lower(), name_suffix])
subnet_name = self.vcpecommon.network_name_to_subnet_name(network_name)
common_dict['${' + network_role+'_net}'] = network_name
common_dict['${' + network_role+'_subnet}'] = subnet_name
replace_dict = {'${network_role}': network_role,
'${service_type}': 'vCPE',
'${network_type}': 'Generic NeutronNet',
'${network_name}': network_name,
'${subnet_start_ip}': subnet_start_ip,
'${subnet_gateway}': subnet_gateway
}
self.logger.info('Preloading network ' + network_role)
self.logger.info('template_file:' + template_file)
if 'networkgra' in template_file:
return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_network_gra_url)
else:
return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_network_url)
def preload(self, template_file, replace_dict, url):
self.logger.debug('tempalte_file:'+ template_file)
json_data = self.generate_json(template_file, replace_dict)
self.logger.debug(json.dumps(json_data, indent=4, sort_keys=True))
r = requests.post(url, headers=self.vcpecommon.sdnc_headers, auth=self.vcpecommon.sdnc_userpass, json=json_data, verify=False)
response = r.json()
if int(response.get('output', {}).get('response-code', 0)) != 200:
self.logger.debug(json.dumps(response, indent=4, sort_keys=True))
self.logger.error('Preloading failed.')
return False
return True
def preload_vgw(self, template_file, brg_mac, commont_dict, name_suffix):
replace_dict = {'${brg_mac}': brg_mac,
'${suffix}': name_suffix
}
replace_dict.update(commont_dict)
self.logger.info('Preloading vGW')
return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_vnf_url)
def preload_vgw_gra(self, template_file, brg_mac, commont_dict, name_suffix, vgw_vfmod_name_index):
replace_dict = {'${brg_mac}': brg_mac,
'${suffix}': name_suffix,
'${vgw_vfmod_name_index}': vgw_vfmod_name_index
}
replace_dict.update(commont_dict)
self.logger.info('Preloading vGW-GRA')
return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_gra_url)
def preload_vfmodule(self, template_file, service_instance_id, vnf_model, vfmodule_model, common_dict, name_suffix , gra_api_flag):
"""
:param template_file:
:param service_instance_id:
:param vnf_model: parsing results from csar_parser
:param vfmodule_model: parsing results from csar_parser
:param common_dict:
:param name_suffix:
:return:
"""
# examples:
# vfmodule_model['modelCustomizationName']: "Vspinfra111601..base_vcpe_infra..module-0",
# vnf_model['modelCustomizationName']: "vspinfra111601 0",
vfmodule_name = '_'.join([self.vcpecommon.instance_name_prefix['vfmodule'],
vfmodule_model['modelCustomizationName'].split('..')[0].lower(), name_suffix])
# vnf_type and generic_vnf_type are identical
replace_dict = {'${vnf_type}': vfmodule_model['modelCustomizationName'],
'${generic_vnf_type}': vfmodule_model['modelCustomizationName'],
'${service_type}': service_instance_id,
'${generic_vnf_name}': vnf_model['modelCustomizationName'],
'${vnf_name}': vfmodule_name,
'${mr_ip_addr}': self.vcpecommon.mr_ip_addr,
'${mr_ip_port}': self.vcpecommon.mr_ip_port,
'${sdnc_oam_ip}': self.vcpecommon.sdnc_oam_ip,
'${suffix}': name_suffix}
replace_dict.update(common_dict)
self.logger.info('Preloading VF Module ' + vfmodule_name)
if gra_api_flag:
return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_gra_url)
else:
return self.preload(template_file, replace_dict, self.vcpecommon.sdnc_preload_vnf_url)
def preload_all_networks(self, template_file, name_suffix):
common_dict = {'${' + k + '}': v for k, v in self.vcpecommon.common_preload_config.items()}
for network, v in self.vcpecommon.preload_network_config.items():
subnet_start_ip, subnet_gateway_ip = v
if not self.preload_network(template_file, network, subnet_start_ip, subnet_gateway_ip,
common_dict, name_suffix):
return None
return common_dict
def aai_region_query(self, req_method, json=None, verify=False):
"""
Perform actual AAI API request for region
:param req_method: request method ({'get','put'})
:param json: Json payload
:param verify: SSL verify mode
:return:
"""
url, headers, auth = (self.vcpecommon.aai_region_query_url,
self.vcpecommon.aai_headers,
self.vcpecommon.aai_userpass)
try:
if req_method == 'get':
request = requests.get(url, headers=headers, auth=auth,
verify=verify)
elif req_method == 'put':
request = requests.put(url, headers=headers, auth=auth,
verify=verify, json=json)
else:
raise requests.exceptions.RequestException
except requests.exceptions.RequestException as e:
self.logger.error("Error connecting to AAI API. Error details: " + str(e.message))
return False
try:
assert request.status_code == 200
except AssertionError:
self.logger.error('AAI request failed. API returned http code ' + str(request.status_code))
return False
try:
return request.json()
except ValueError as e:
if req_method == 'get':
self.logger.error('Unable to parse AAI response: ' + e.message)
return False
elif req_method == 'put':
return request.ok
else:
return False
def preload_aai_data(self, template_aai_region_data):
"""
Update aai region data with identity-url
:param template_aai_region_data: path to region data template
:return:
"""
request = self.aai_region_query('get')
if request:
# Check if identity-url already updated (for idempotency)
self.logger.debug("Regiond data acquired from AAI:\n" + json.dumps(request,indent=4))
try:
assert request['identity-url']
except KeyError:
pass
else:
self.logger.info('Identity-url already present in {0} data, not updating'.format(self.vcpecommon.cloud['--os-region-name']))
return
# Get resource_version and relationship_list from region data
resource_version = request['resource-version']
relationship_list = request['relationship-list']
replace_dict = {'${identity-url}': self.vcpecommon.cloud['--os-auth-url'],
'${identity_api_version}': self.vcpecommon.cloud['--os-identity-api-version'],
'${region_name}': self.vcpecommon.cloud['--os-region-name'],
'${resource_version}': resource_version
}
json_data = self.generate_json(template_aai_region_data, replace_dict)
json_data['relationship-list'] = relationship_list
self.logger.debug('Region update payload:\n' + json.dumps(json_data,indent=4))
else:
sys.exit(1)
# Update region data
request = self.aai_region_query('put', json_data)
if request:
self.logger.info('Successully updated identity-url in {0} '
'region'.format(self.vcpecommon.cloud['--os-region-name']))
else:
sys.exit(1)
def test(self):
# this is for testing purpose
name_suffix = datetime.now().strftime('%Y%m%d%H%M')
preloader = Preload(self.vcpecommon)
network_dict = {'${' + k + '}': v for k, v in self.vcpecommon.common_preload_config.items()}
template_file = 'preload_templates/template.network.json'
for k, v in self.vcpecommon.preload_network_config.items():
if not preloader.preload_network(template_file, k, v[0], v[1], network_dict, name_suffix):
break
print('---------------------------------------------------------------')
print('Network related replacement dictionary:')
print(json.dumps(network_dict, indent=4, sort_keys=True))
print('---------------------------------------------------------------')
keys = ['infra', 'bng', 'gmux', 'brg']
for key in keys:
key_vnf= key + "_"
key_gra = key + "gra_"
csar_file = self.vcpecommon.find_file(key, 'csar', 'csar')
template_file = self.vcpecommon.find_file(key_vnf, 'json', 'preload_templates')
template_file_gra = self.vcpecommon.find_file(key_gra, 'json', 'preload_templates')
if csar_file and template_file and template_file_gra:
parser = csar_parser.CsarParser()
parser.parse_csar(csar_file)
service_instance_id = 'test112233'
# preload both VNF-API and GRA-API
preloader.preload_vfmodule(template_file, service_instance_id, parser.vnf_models[0],
parser.vfmodule_models[0], network_dict, name_suffix, False)
preloader.preload_vfmodule(template_file_gra, service_instance_id, parser.vnf_models[0],
parser.vfmodule_models[0], network_dict, name_suffix, True)
def test_sniro(self):
template_sniro_data = self.vcpecommon.find_file('sniro_data', 'json', 'preload_templates')
template_sniro_request = self.vcpecommon.find_file('sniro_request', 'json', 'preload_templates')
vcperescust_csar = self.vcpecommon.find_file('rescust', 'csar', 'csar')
parser = csar_parser.CsarParser()
parser.parse_csar(vcperescust_csar)
tunnelxconn_ar_name = None
brg_ar_name = None
vgw_name = None
for model in parser.vnf_models:
if 'tunnel' in model['modelCustomizationName']:
tunnelxconn_ar_name = model['modelCustomizationName']
elif 'brg' in model['modelCustomizationName']:
brg_ar_name = model['modelCustomizationName']
elif 'vgw' in model['modelCustomizationName']:
vgw_name = model['modelCustomizationName']
if not (tunnelxconn_ar_name and brg_ar_name and vgw_name):
self.logger.error('Cannot find all names from %s.', vcperescust_csar)
sys.exit(1)
vgmux_svc_instance_uuid = '88888888888888'
vbrg_svc_instance_uuid = '999999999999999'
self.preload_sniro(template_sniro_data, template_sniro_request, tunnelxconn_ar_name, vgw_name, brg_ar_name,
vgmux_svc_instance_uuid, vbrg_svc_instance_uuid)
|