Skip to content

Commit

Permalink
Function delete node and nodeModel changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatanero committed Jun 25, 2017
1 parent 65a1626 commit 65ce5ba
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 58 deletions.
4 changes: 2 additions & 2 deletions dmz2.yaml
Expand Up @@ -24,8 +24,8 @@ vnf:
type: data
VNFC: VirtualMachine-3
local_iface_name: xe1
description: Created by VIBNEMO translator from source dmz2, template dmz on 2017/06/02
02:02:24
description: Created by VIBNEMO translator from source dmz2, template dmz on 2017/06/24
19:17:21
VNFC:
- name: VirtualMachine-1
description: Dataplane VM1 with 4 threads, 2 GB hugepages, 2 SR-IOV interface
Expand Down
Expand Up @@ -234,7 +234,7 @@ String DeleteIntent(UserId userId, DataBroker dataBroker, TenantManage tenantMan
{
return DeleteConnectionPoint(userId,dataBroker,tenantManage);
}
| < TEMPLATEDEFINITION >
| < NODEMODEL >
{
return DeleteTemplateDefinition(userId,dataBroker,tenantManage);
}
Expand Down Expand Up @@ -841,18 +841,18 @@ String abstractConnectionPoint(UpdateTemplateDefinitionLang definition):
}
(
<AT><VNFD><COLON>
(
(
extInterfaceName = < TEMPID >
{
extInt=extInterfaceName.image;
System.out.println(extInterfaceName.image);
}
{
extInt=extInterfaceName.image;
System.out.println(extInterfaceName.image);
}
| extInterfaceName = < ID >
{
extInt=extInterfaceName.image;
System.out.println(extInterfaceName.image);
}
)
System.out.println(extInterfaceName.image);
}
)
)?
<SEMICOLON>
{
Expand Down Expand Up @@ -883,8 +883,14 @@ String DeleteConnection(UserId userId, DataBroker dataBroker, TenantManage tenan
DeleteConnectionLang deleteConnectionlang = new DeleteConnectionLang(dataBroker, tenantManage);
}
{
(
objConnNameToken = < ID >
|
objConnNameToken = < TEMPID >
)

< SEMICOLON >

{
return deleteConnectionlang.DeleteConnectionHandling(userId, objConnNameToken.image);
}
Expand Down Expand Up @@ -943,7 +949,7 @@ String DeleteConnectionPoint(UserId userId, DataBroker dataBroker, TenantManage
(
objConnPointNameToken = < ID >
|
objConnPointNameToken = < TEMPID >
objConnPointNameToken = < TEMPID >

< SEMICOLON >
)
Expand All @@ -961,7 +967,7 @@ String DeleteTemplateDefinition(UserId userId, DataBroker dataBroker, TenantMana
(
objTemplateDefinitionNameToken = < ID >
|
objTemplateDefinitionNameToken = < TEMPID >
objTemplateDefinitionNameToken = < TEMPID >
)
< SEMICOLON >
{
Expand Down Expand Up @@ -1227,4 +1233,3 @@ LinkedHashMap<String,String> nodeMultiProperty():
return propertyvalue;
}
}

Expand Up @@ -7,6 +7,7 @@
*/
/* Generated By:JavaCC: Do not edit this line. NEMOparser.java */
package org.opendaylight.nemo.user.vnspacemanager.languagestyle.NEMOParse;

import org.opendaylight.nemo.user.vnspacemanager.languagestyle.updateintentlang.UpdateNodeLang;
import org.opendaylight.nemo.user.vnspacemanager.languagestyle.updateintentlang.UpdateConnectionLang;
import org.opendaylight.nemo.user.vnspacemanager.languagestyle.updateintentlang.UpdateFlowLang;
Expand Down Expand Up @@ -144,8 +145,8 @@ static final public String DeleteIntent(UserId userId, DataBroker dataBroker, Te
jj_consume_token(CONNECTIONPOINT);
{if (true) return DeleteConnectionPoint(userId,dataBroker,tenantManage);}
break;
case TEMPLATEDEFINITION:
jj_consume_token(TEMPLATEDEFINITION);
case NODEMODEL:
jj_consume_token(NODEMODEL);
{if (true) return DeleteTemplateDefinition(userId,dataBroker,tenantManage);}
break;
default:
Expand Down Expand Up @@ -1136,7 +1137,18 @@ static final public String DeleteNode(UserId userId, DataBroker dataBroker, Tena
static final public String DeleteConnection(UserId userId, DataBroker dataBroker, TenantManage tenantManage) throws ParseException {
Token objConnNameToken = null;
DeleteConnectionLang deleteConnectionlang = new DeleteConnectionLang(dataBroker, tenantManage);
objConnNameToken = jj_consume_token(ID);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ID:
objConnNameToken = jj_consume_token(ID);
break;
case TEMPID:
objConnNameToken = jj_consume_token(TEMPID);
break;
default:
jj_la1[60] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
jj_consume_token(SEMICOLON);
{if (true) return deleteConnectionlang.DeleteConnectionHandling(userId, objConnNameToken.image);}
throw new Error("Missing return statement in function");
Expand Down Expand Up @@ -1171,7 +1183,7 @@ static final public String DeleteTemplateInstance(UserId userId, DataBroker data
objTemplateInstanceNameToken = jj_consume_token(TEMPID);
break;
default:
jj_la1[60] = jj_gen;
jj_la1[61] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
Expand All @@ -1192,7 +1204,7 @@ static final public String DeleteConnectionPoint(UserId userId, DataBroker dataB
jj_consume_token(SEMICOLON);
break;
default:
jj_la1[61] = jj_gen;
jj_la1[62] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
Expand All @@ -1211,7 +1223,7 @@ static final public String DeleteTemplateDefinition(UserId userId, DataBroker da
objTemplateDefinitionNameToken = jj_consume_token(TEMPID);
break;
default:
jj_la1[62] = jj_gen;
jj_la1[63] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
Expand Down Expand Up @@ -1269,7 +1281,7 @@ static final public String Query(UserId userId, DataBroker dataBroker, TenantMan
objItemToken = jj_consume_token(OPERATIONS);
break;
default:
jj_la1[63] = jj_gen;
jj_la1[64] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
Expand All @@ -1279,7 +1291,7 @@ static final public String Query(UserId userId, DataBroker dataBroker, TenantMan
objTargetToken = jj_consume_token(ID);
break;
default:
jj_la1[64] = jj_gen;
jj_la1[65] = jj_gen;
;
}
jj_consume_token(SEMICOLON);
Expand Down Expand Up @@ -1326,7 +1338,7 @@ static final public LinkedHashMap<String,String> conditionTarget() throws ParseE
targetValue.put(objRangeLeft.image+","+objRangeRight.image,"range");
break;
default:
jj_la1[65] = jj_gen;
jj_la1[66] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
Expand Down Expand Up @@ -1387,7 +1399,7 @@ static final public LinkedHashMap<String,String> property() throws ParseExceptio
propertyvalue.put(objPropertyValueToken.image, "string");
break;
default:
jj_la1[66] = jj_gen;
jj_la1[67] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
Expand All @@ -1405,13 +1417,13 @@ static final public LinkedHashMap<String,String> property() throws ParseExceptio
propertyvalue.put(objRangeLeft.image+","+objRangeRight.image,"range");
break;
default:
jj_la1[67] = jj_gen;
jj_la1[68] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_la1[68] = jj_gen;
jj_la1[69] = jj_gen;
LinkedHashMap<String,String> multiProperty = nodeMultiProperty();
for (String value : multiProperty.keySet())
{
Expand Down Expand Up @@ -1439,7 +1451,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[69] = jj_gen;
jj_la1[70] = jj_gen;
break label_19;
}
jj_consume_token(COMMA);
Expand All @@ -1457,7 +1469,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[70] = jj_gen;
jj_la1[71] = jj_gen;
break label_20;
}
jj_consume_token(COMMA);
Expand All @@ -1475,7 +1487,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[71] = jj_gen;
jj_la1[72] = jj_gen;
break label_21;
}
jj_consume_token(COMMA);
Expand All @@ -1493,7 +1505,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[72] = jj_gen;
jj_la1[73] = jj_gen;
break label_22;
}
jj_consume_token(COMMA);
Expand All @@ -1511,7 +1523,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[73] = jj_gen;
jj_la1[74] = jj_gen;
break label_23;
}
jj_consume_token(COMMA);
Expand All @@ -1529,7 +1541,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[74] = jj_gen;
jj_la1[75] = jj_gen;
break label_24;
}
jj_consume_token(COMMA);
Expand All @@ -1547,7 +1559,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[75] = jj_gen;
jj_la1[76] = jj_gen;
break label_25;
}
jj_consume_token(COMMA);
Expand All @@ -1565,7 +1577,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
;
break;
default:
jj_la1[76] = jj_gen;
jj_la1[77] = jj_gen;
break label_26;
}
jj_consume_token(COMMA);
Expand All @@ -1582,7 +1594,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
propertyvalue.put(objRangeLeft.image+","+objRangeRight.image,"range");
break;
default:
jj_la1[77] = jj_gen;
jj_la1[78] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
Expand All @@ -1601,7 +1613,7 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
static public Token jj_nt;
static private int jj_ntk;
static private int jj_gen;
static final private int[] jj_la1 = new int[78];
static final private int[] jj_la1 = new int[79];
static private int[] jj_la1_0;
static private int[] jj_la1_1;
static private int[] jj_la1_2;
Expand All @@ -1611,13 +1623,13 @@ static final public LinkedHashMap<String,String> nodeMultiProperty() throws Pars
jj_la1_init_2();
}
private static void jj_la1_init_0() {
jj_la1_0 = new int[] {0xe000000,0x1e000000,0x20000000,0x20000000,0x40,0x80000000,0x40,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x40,0x40,0x0,0x4000,0x1f8000,0x7000,0x7000,0x1f8000,0x0,0x20,0x40,0x20,0x0,0x0,0x40,0x0,0x0,0x0,0x20000000,0x20000000,0x40,0x80000000,0x40,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x40,0x40,0x0,0x4000,0x1f8000,0x7000,0x7000,0x1f8000,0x0,0x20,0x40,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0000000,0x0,0x100,0x0,0x100,0x100,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x100,};
jj_la1_0 = new int[] {0xe000000,0x1e000000,0x20000000,0x20000000,0x40,0x80000000,0x40,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x40,0x40,0x0,0x4000,0x1f8000,0x7000,0x7000,0x1f8000,0x0,0x20,0x40,0x20,0x0,0x0,0x40,0x0,0x0,0x0,0x20000000,0x20000000,0x40,0x80000000,0x40,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x40,0x40,0x0,0x4000,0x1f8000,0x7000,0x7000,0x1f8000,0x0,0x20,0x40,0x20,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0000000,0x0,0x100,0x0,0x100,0x100,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x100,};
}
private static void jj_la1_init_1() {
jj_la1_1 = new int[] {0x0,0x400,0x200052,0xc0005a,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x4,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x200,0x7000000,0x0,0x7000000,0x1,0x1000,0x5a,0x5a,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x4,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x200,0x0,0x8000000,0x0,0x0,0x0,0x0,0x1e23a5,0x800,0x80000000,0x0,0x80000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,};
jj_la1_1 = new int[] {0x0,0x400,0x200052,0x60005a,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x4,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x200,0x7000000,0x0,0x7000000,0x1,0x1000,0x5a,0x5a,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x4,0x0,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x200,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x1e23a5,0x800,0x80000000,0x0,0x80000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,};
}
private static void jj_la1_init_2() {
jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3,0x3,0x3,0x3,0x1,0x0,0x61,0x1eb,0x1eb,0x1eb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1eb,};
jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3,0x3,0x3,0x3,0x3,0x1,0x0,0x61,0x1eb,0x1eb,0x1eb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1eb,};
}

/** Constructor with InputStream. */
Expand All @@ -1638,7 +1650,7 @@ public NEMOparser(java.io.InputStream stream, String encoding) {
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 78; i++) jj_la1[i] = -1;
for (int i = 0; i < 79; i++) jj_la1[i] = -1;
}

/** Reinitialise. */
Expand All @@ -1652,7 +1664,7 @@ static public void ReInit(java.io.InputStream stream, String encoding) {
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 78; i++) jj_la1[i] = -1;
for (int i = 0; i < 79; i++) jj_la1[i] = -1;
}

/** Constructor. */
Expand All @@ -1669,7 +1681,7 @@ public NEMOparser(java.io.Reader stream) {
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 78; i++) jj_la1[i] = -1;
for (int i = 0; i < 79; i++) jj_la1[i] = -1;
}

/** Reinitialise. */
Expand All @@ -1679,7 +1691,7 @@ static public void ReInit(java.io.Reader stream) {
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 78; i++) jj_la1[i] = -1;
for (int i = 0; i < 79; i++) jj_la1[i] = -1;
}

/** Constructor with generated Token Manager. */
Expand All @@ -1695,7 +1707,7 @@ public NEMOparser(NEMOparserTokenManager tm) {
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 78; i++) jj_la1[i] = -1;
for (int i = 0; i < 79; i++) jj_la1[i] = -1;
}

/** Reinitialise. */
Expand All @@ -1704,7 +1716,7 @@ public void ReInit(NEMOparserTokenManager tm) {
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 78; i++) jj_la1[i] = -1;
for (int i = 0; i < 79; i++) jj_la1[i] = -1;
}

static private Token jj_consume_token(int kind) throws ParseException {
Expand Down Expand Up @@ -1760,7 +1772,7 @@ static public ParseException generateParseException() {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
for (int i = 0; i < 78; i++) {
for (int i = 0; i < 79; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1<<j)) != 0) {
Expand Down Expand Up @@ -1798,4 +1810,3 @@ static final public void disable_tracing() {
}

}

Expand Up @@ -277,4 +277,3 @@ public interface NEMOparserConstants {
};

}

Expand Up @@ -2338,4 +2338,3 @@ static private void jjCheckNAddStates(int start, int end)
}

}

Expand Up @@ -192,4 +192,3 @@ static String add_escapes(String str) {

}
/* JavaCC - OriginalChecksum=89b62195b9740dc55de3804c24ab6e9a (do not edit this line) */

Expand Up @@ -480,4 +480,3 @@ static public void adjustBeginLineColumn(int newLine, int newCol)

}
/* JavaCC - OriginalChecksum=30c5475215f06e0e8e3c9ed22df2d210 (do not edit this line) */

0 comments on commit 65ce5ba

Please sign in to comment.