1 import { Parser } from './Parser';
3 export class VtlYMLParser implements Parser {
4 variables: Set<string> = new Set();
5 getVariables(fileContent: string): string[] {
6 if (fileContent.includes('${')) {
7 const xmlSplit = fileContent.split('${');
8 for (const val of xmlSplit) {
9 const res = val.substring(0, val.indexOf('}'));
10 if (res && res.length > 0) {
11 this.variables.add(res);
16 return [...this.variables];
23 <vlb-business-vnf-onap-plugin xmlns="urn:opendaylight:params:xml:ns:yang:vlb-business-vnf-onap-plugin">
26 <ip-addr>$vdns_int_private_ip_0</ip-addr>
27 <oam-ip-addr>$vdns_onap_private_ip_0</oam-ip-addr>
29 <enabled>false</enabled>
33 </vlb-business-vnf-onap-plugin>