Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate all projects to support the necessary metamodel changes of GIPSL v1.5 #102

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion network.metrics/src/metrics/CostUtility.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public static double getNetworkRejectionCost(final VirtualNetwork vNet) {
final double bwFactor = 10;
final double srvFactor = 10;

for (final Node n : vNet.getNodes()) {
for (final Node n : vNet.getNodess()) {
if (n instanceof VirtualServer) {
final VirtualServer vsrv = (VirtualServer) n;
cost += srvFactor * (vsrv.getCpu() + vsrv.getMemory() + vsrv.getStorage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class OperatingCostMetric implements IMetric {
public OperatingCostMetric(final SubstrateNetwork sNet) {
double value = 0;

for (final Node n : sNet.getNodes()) {
for (final Node n : sNet.getNodess()) {
// Server costs
if (n instanceof SubstrateServer) {
final SubstrateServer ssrv = (SubstrateServer) n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public TotalPathCostMetric(final SubstrateNetwork sNet) {
}

// Nodes
for (final Node n : guest.getNodes()) {
for (final Node n : guest.getNodess()) {
if (n instanceof VirtualServer) {
// Virtual server to substrate server cost
cost += 1;
Expand Down
10 changes: 5 additions & 5 deletions network.model.rules.racka/src/network/model/rules/racka/Rules.gt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ rule serverMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateNode
-nodess -> substrateNode
}

virtualNetwork: VirtualNetwork {
-nodes -> virtualNode
-nodess -> virtualNode
}

# virtualNode.cpu <= substrateNode.residualCpu
Expand Down Expand Up @@ -63,11 +63,11 @@ rule switchMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateSwitch
-nodess -> substrateSwitch
}

virtualNetwork: VirtualNetwork {
-nodes -> virtualSwitch
-nodess -> virtualSwitch
}
}

Expand Down Expand Up @@ -130,7 +130,7 @@ rule linkServerMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateServer
-nodess -> substrateServer
}

virtualNetwork: VirtualNetwork {
Expand Down
10 changes: 5 additions & 5 deletions network.model.rules.rackb/src/network/model/rules/rackb/Rules.gt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ rule serverMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateNode
-nodess -> substrateNode
}

virtualNetwork: VirtualNetwork {
-nodes -> virtualNode
-nodess -> virtualNode
}

# virtualNode.cpu <= substrateNode.residualCpu
Expand Down Expand Up @@ -63,11 +63,11 @@ rule switchMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateNode
-nodess -> substrateNode
}

virtualNetwork: VirtualNetwork {
-nodes -> virtualSwitch
-nodess -> virtualSwitch
}
}

Expand Down Expand Up @@ -173,7 +173,7 @@ rule linkServerMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateServer
-nodess -> substrateServer
}

virtualNetwork: VirtualNetwork {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rule vnetToServer() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateNode
-nodess -> substrateNode
}

virtualNetwork: VirtualNetwork {
Expand All @@ -30,10 +30,10 @@ rule vnetToServer() {
forEach links->l <VirtualLink> {
++ substrateNode - guestLinks->l
}
forEach nodes->srv <VirtualServer> {
forEach nodess->srv <VirtualServer> {
++ substrateNode - guestServers->srv
}
forEach nodes->sw <VirtualSwitch> {
forEach nodess->sw <VirtualSwitch> {
++ substrateNode - guestSwitches->sw
}
}
Expand Down
10 changes: 5 additions & 5 deletions network.model.rules/src/network/model/rules/embeddingRules.gt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ rule serverMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateNode
-nodess -> substrateNode
}

virtualNetwork: VirtualNetwork {
-nodes -> virtualNode
-nodess -> virtualNode
}

# virtualNode.cpu <= substrateNode.residualCpu
Expand Down Expand Up @@ -64,11 +64,11 @@ rule switchNodeMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateNode
-nodess -> substrateNode
}

virtualNetwork: VirtualNetwork {
-nodes -> virtualSwitch
-nodess -> virtualSwitch
}
}

Expand Down Expand Up @@ -128,7 +128,7 @@ rule linkServerMatchPositive() {
}

substrateNetwork: SubstrateNetwork {
-nodes -> substrateServer
-nodess -> substrateServer
}

virtualNetwork: VirtualNetwork {
Expand Down
26 changes: 13 additions & 13 deletions test.suite.iflye/resources/pathLoadModel.xmi
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<model:Root xmlns:model="platform:/resource/network.model/model/Model.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0">
<networks xsi:type="model:SubstrateNetwork" root="/" name="net">
<nodes xsi:type="model:SubstrateSwitch" network="//@networks.0" name="sw" depth="0" incomingLinks="//@networks.0/@links.0 //@networks.0/@links.1" outgoingLinks="//@networks.0/@links.2 //@networks.0/@links.3" incomingPaths="//@networks.0/@paths.2 //@networks.0/@paths.4" paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.2 //@networks.0/@paths.3 //@networks.0/@paths.4 //@networks.0/@paths.5" outgoingPaths="//@networks.0/@paths.3 //@networks.0/@paths.5" />
<nodes xsi:type="model:SubstrateServer" network="//@networks.0" name="srv1" depth="1" cpu="0" memory="0" storage="0" residualCpu="0" residualMemory="0" residualStorage="0" outgoingLinks="//@networks.0/@links.0" incomingLinks="//@networks.0/@links.2" outgoingPaths="//@networks.0/@paths.0 //@networks.0/@paths.2" paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.2 //@networks.0/@paths.3" incomingPaths="//@networks.0/@paths.1 //@networks.0/@paths.3" />
<nodes xsi:type="model:SubstrateServer" network="//@networks.0" name="srv2" depth="1" cpu="0" memory="0" storage="0" residualCpu="0" residualMemory="0" residualStorage="0" outgoingLinks="//@networks.0/@links.1" incomingLinks="//@networks.0/@links.3" outgoingPaths="//@networks.0/@paths.1 //@networks.0/@paths.4" paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.4 //@networks.0/@paths.5" incomingPaths="//@networks.0/@paths.0 //@networks.0/@paths.5" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodes.1" target="//@networks.0/@nodes.0" name="ln1" bandwidth="1" residualBandwidth="1" paths="//@networks.0/@paths.0 //@networks.0/@paths.2" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodes.2" target="//@networks.0/@nodes.0" name="ln2" bandwidth="2" residualBandwidth="2" paths="//@networks.0/@paths.1 //@networks.0/@paths.4" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodes.0" target="//@networks.0/@nodes.1" name="ln3" bandwidth="1" residualBandwidth="1" paths="//@networks.0/@paths.1 //@networks.0/@paths.3" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodes.0" target="//@networks.0/@nodes.2" name="ln4" bandwidth="2" residualBandwidth="2" paths="//@networks.0/@paths.0 //@networks.0/@paths.5" />
<paths network="//@networks.0" source="//@networks.0/@nodes.1" target="//@networks.0/@nodes.2" nodes="//@networks.0/@nodes.1 //@networks.0/@nodes.0 //@networks.0/@nodes.2" links="//@networks.0/@links.0 //@networks.0/@links.3" name="path-srv1-sw-srv2" bandwidth="1" hops="2" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodes.2" target="//@networks.0/@nodes.1" nodes="//@networks.0/@nodes.2 //@networks.0/@nodes.0 //@networks.0/@nodes.1" links="//@networks.0/@links.1 //@networks.0/@links.2" name="path-srv2-sw-srv1" bandwidth="1" hops="2" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodes.1" target="//@networks.0/@nodes.0" nodes="//@networks.0/@nodes.1 //@networks.0/@nodes.0" links="//@networks.0/@links.0" name="path-srv1-sw" bandwidth="1" hops="1" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodes.0" target="//@networks.0/@nodes.1" nodes="//@networks.0/@nodes.0 //@networks.0/@nodes.1" links="//@networks.0/@links.2" name="path-sw-srv1" bandwidth="1" hops="1" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodes.2" target="//@networks.0/@nodes.0" nodes="//@networks.0/@nodes.2 //@networks.0/@nodes.0" links="//@networks.0/@links.1" name="path-srv2-sw" bandwidth="2" hops="1" residualBandwidth="2" />
<paths network="//@networks.0" source="//@networks.0/@nodes.0" target="//@networks.0/@nodes.2" nodes="//@networks.0/@nodes.0 //@networks.0/@nodes.2" links="//@networks.0/@links.3" name="path-sw-srv2" bandwidth="2" hops="1" residualBandwidth="2" />
<nodess xsi:type="model:SubstrateSwitch" network="//@networks.0" name="sw" depth="0" incomingLinks="//@networks.0/@links.0 //@networks.0/@links.1" outgoingLinks="//@networks.0/@links.2 //@networks.0/@links.3" incomingPaths="//@networks.0/@paths.2 //@networks.0/@paths.4" paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.2 //@networks.0/@paths.3 //@networks.0/@paths.4 //@networks.0/@paths.5" outgoingPaths="//@networks.0/@paths.3 //@networks.0/@paths.5" />
<nodess xsi:type="model:SubstrateServer" network="//@networks.0" name="srv1" depth="1" cpu="0" memory="0" storage="0" residualCpu="0" residualMemory="0" residualStorage="0" outgoingLinks="//@networks.0/@links.0" incomingLinks="//@networks.0/@links.2" outgoingPaths="//@networks.0/@paths.0 //@networks.0/@paths.2" paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.2 //@networks.0/@paths.3" incomingPaths="//@networks.0/@paths.1 //@networks.0/@paths.3" />
<nodess xsi:type="model:SubstrateServer" network="//@networks.0" name="srv2" depth="1" cpu="0" memory="0" storage="0" residualCpu="0" residualMemory="0" residualStorage="0" outgoingLinks="//@networks.0/@links.1" incomingLinks="//@networks.0/@links.3" outgoingPaths="//@networks.0/@paths.1 //@networks.0/@paths.4" paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.4 //@networks.0/@paths.5" incomingPaths="//@networks.0/@paths.0 //@networks.0/@paths.5" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodess.1" target="//@networks.0/@nodess.0" name="ln1" bandwidth="1" residualBandwidth="1" paths="//@networks.0/@paths.0 //@networks.0/@paths.2" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodess.2" target="//@networks.0/@nodess.0" name="ln2" bandwidth="2" residualBandwidth="2" paths="//@networks.0/@paths.1 //@networks.0/@paths.4" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodess.0" target="//@networks.0/@nodess.1" name="ln3" bandwidth="1" residualBandwidth="1" paths="//@networks.0/@paths.1 //@networks.0/@paths.3" />
<links xsi:type="model:SubstrateLink" network="//@networks.0" source="//@networks.0/@nodess.0" target="//@networks.0/@nodess.2" name="ln4" bandwidth="2" residualBandwidth="2" paths="//@networks.0/@paths.0 //@networks.0/@paths.5" />
<paths network="//@networks.0" source="//@networks.0/@nodess.1" target="//@networks.0/@nodess.2" nodes="//@networks.0/@nodess.1 //@networks.0/@nodess.0 //@networks.0/@nodess.2" links="//@networks.0/@links.0 //@networks.0/@links.3" name="path-srv1-sw-srv2" bandwidth="1" hops="2" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodess.2" target="//@networks.0/@nodess.1" nodes="//@networks.0/@nodess.2 //@networks.0/@nodess.0 //@networks.0/@nodess.1" links="//@networks.0/@links.1 //@networks.0/@links.2" name="path-srv2-sw-srv1" bandwidth="1" hops="2" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodess.1" target="//@networks.0/@nodess.0" nodes="//@networks.0/@nodess.1 //@networks.0/@nodess.0" links="//@networks.0/@links.0" name="path-srv1-sw" bandwidth="1" hops="1" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodess.0" target="//@networks.0/@nodess.1" nodes="//@networks.0/@nodess.0 //@networks.0/@nodess.1" links="//@networks.0/@links.2" name="path-sw-srv1" bandwidth="1" hops="1" residualBandwidth="1" />
<paths network="//@networks.0" source="//@networks.0/@nodess.2" target="//@networks.0/@nodess.0" nodes="//@networks.0/@nodess.2 //@networks.0/@nodess.0" links="//@networks.0/@links.1" name="path-srv2-sw" bandwidth="2" hops="1" residualBandwidth="2" />
<paths network="//@networks.0" source="//@networks.0/@nodess.0" target="//@networks.0/@nodess.2" nodes="//@networks.0/@nodess.0 //@networks.0/@nodess.2" links="//@networks.0/@links.3" name="path-sw-srv2" bandwidth="2" hops="1" residualBandwidth="2" />
</networks>
</model:Root>
74 changes: 37 additions & 37 deletions test.suite.iflye/resources/pathLoadModel_embedding.xmi
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
<networks
xsi:type="network.model:SubstrateNetwork"
name="net">
<nodes xsi:type="network.model:SubstrateSwitch"
<nodess xsi:type="network.model:SubstrateSwitch"
name="sw"
outgoingLinks="//@networks.0/@links.2 //@networks.0/@links.3"
incomingLinks="//@networks.0/@links.0 //@networks.0/@links.1"
guestSwitches="//@networks.1/@nodes.1"
guestSwitches="//@networks.1/@nodess.1"
paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.2 //@networks.0/@paths.3 //@networks.0/@paths.4 //@networks.0/@paths.5"
outgoingPaths="//@networks.0/@paths.3 //@networks.0/@paths.5"
incomingPaths="//@networks.0/@paths.2 //@networks.0/@paths.4"/>
<nodes xsi:type="network.model:SubstrateServer"
<nodess xsi:type="network.model:SubstrateServer"
name="srv1"
depth="1"
outgoingLinks="//@networks.0/@links.0"
incomingLinks="//@networks.0/@links.2"
paths="//@networks.0/@paths.0 //@networks.0/@paths.1 //@networks.0/@paths.2 //@networks.0/@paths.3"
outgoingPaths="//@networks.0/@paths.0 //@networks.0/@paths.2"
incomingPaths="//@networks.0/@paths.1 //@networks.0/@paths.3"
guestServers="//@networks.1/@nodes.0"/>
<nodes xsi:type="network.model:SubstrateServer"
guestServers="//@networks.1/@nodess.0"/>
<nodess xsi:type="network.model:SubstrateServer"
name="srv2"
depth="1"
outgoingLinks="//@networks.0/@links.1"
Expand All @@ -35,76 +35,76 @@
<links xsi:type="network.model:SubstrateLink"
name="ln1"
bandwidth="1"
source="//@networks.0/@nodes.1"
target="//@networks.0/@nodes.0"
source="//@networks.0/@nodess.1"
target="//@networks.0/@nodess.0"
residualBandwidth="1"
paths="//@networks.0/@paths.0 //@networks.0/@paths.2"/>
<links xsi:type="network.model:SubstrateLink"
name="ln2"
bandwidth="2"
source="//@networks.0/@nodes.2"
target="//@networks.0/@nodes.0"
source="//@networks.0/@nodess.2"
target="//@networks.0/@nodess.0"
residualBandwidth="2"
paths="//@networks.0/@paths.1 //@networks.0/@paths.4"/>
<links xsi:type="network.model:SubstrateLink"
name="ln3"
bandwidth="1"
source="//@networks.0/@nodes.0"
target="//@networks.0/@nodes.1"
source="//@networks.0/@nodess.0"
target="//@networks.0/@nodess.1"
residualBandwidth="-9"
paths="//@networks.0/@paths.1 //@networks.0/@paths.3"/>
<links xsi:type="network.model:SubstrateLink"
name="ln4"
bandwidth="2"
source="//@networks.0/@nodes.0"
target="//@networks.0/@nodes.2"
source="//@networks.0/@nodess.0"
target="//@networks.0/@nodess.2"
residualBandwidth="2"
paths="//@networks.0/@paths.0 //@networks.0/@paths.5"/>
<paths name="path-srv1-sw-srv2"
source="//@networks.0/@nodes.1"
target="//@networks.0/@nodes.2"
nodes="//@networks.0/@nodes.1 //@networks.0/@nodes.0 //@networks.0/@nodes.2"
source="//@networks.0/@nodess.1"
target="//@networks.0/@nodess.2"
nodes="//@networks.0/@nodess.1 //@networks.0/@nodess.0 //@networks.0/@nodess.2"
links="//@networks.0/@links.0 //@networks.0/@links.3"
bandwidth="1"
hops="2"
residualBandwidth="1"/>
<paths name="path-srv2-sw-srv1"
source="//@networks.0/@nodes.2"
target="//@networks.0/@nodes.1"
nodes="//@networks.0/@nodes.2 //@networks.0/@nodes.0 //@networks.0/@nodes.1"
source="//@networks.0/@nodess.2"
target="//@networks.0/@nodess.1"
nodes="//@networks.0/@nodess.2 //@networks.0/@nodess.0 //@networks.0/@nodess.1"
links="//@networks.0/@links.1 //@networks.0/@links.2"
bandwidth="1"
hops="2"
residualBandwidth="1"/>
<paths name="path-srv1-sw"
guestLinks="//@networks.1/@links.0"
source="//@networks.0/@nodes.1"
target="//@networks.0/@nodes.0"
nodes="//@networks.0/@nodes.1 //@networks.0/@nodes.0"
source="//@networks.0/@nodess.1"
target="//@networks.0/@nodess.0"
nodes="//@networks.0/@nodess.1 //@networks.0/@nodess.0"
links="//@networks.0/@links.0"
bandwidth="1"
hops="1"
residualBandwidth="1"/>
<paths name="path-sw-srv1"
source="//@networks.0/@nodes.0"
target="//@networks.0/@nodes.1"
nodes="//@networks.0/@nodes.0 //@networks.0/@nodes.1"
source="//@networks.0/@nodess.0"
target="//@networks.0/@nodess.1"
nodes="//@networks.0/@nodess.0 //@networks.0/@nodess.1"
links="//@networks.0/@links.2"
bandwidth="1"
hops="1"
residualBandwidth="-9"/>
<paths name="path-srv2-sw"
source="//@networks.0/@nodes.2"
target="//@networks.0/@nodes.0"
nodes="//@networks.0/@nodes.2 //@networks.0/@nodes.0"
source="//@networks.0/@nodess.2"
target="//@networks.0/@nodess.0"
nodes="//@networks.0/@nodess.2 //@networks.0/@nodess.0"
links="//@networks.0/@links.1"
bandwidth="2"
hops="1"
residualBandwidth="2"/>
<paths name="path-sw-srv2"
source="//@networks.0/@nodes.0"
target="//@networks.0/@nodes.2"
nodes="//@networks.0/@nodes.0 //@networks.0/@nodes.2"
source="//@networks.0/@nodess.0"
target="//@networks.0/@nodess.2"
nodes="//@networks.0/@nodess.0 //@networks.0/@nodess.2"
links="//@networks.0/@links.3"
bandwidth="2"
hops="1"
Expand All @@ -113,19 +113,19 @@
<networks
xsi:type="network.model:VirtualNetwork"
name="virt">
<nodes xsi:type="network.model:VirtualServer"
<nodess xsi:type="network.model:VirtualServer"
name="vsrv1"
outgoingLinks="//@networks.1/@links.0"
host="//@networks.0/@nodes.1"/>
<nodes xsi:type="network.model:VirtualSwitch"
host="//@networks.0/@nodess.1"/>
<nodess xsi:type="network.model:VirtualSwitch"
name="vsw1"
incomingLinks="//@networks.1/@links.0"
host="//@networks.0/@nodes.0"/>
host="//@networks.0/@nodess.0"/>
<links xsi:type="network.model:VirtualLink"
name="vl1"
bandwidth="10"
source="//@networks.1/@nodes.0"
target="//@networks.1/@nodes.1"
source="//@networks.1/@nodess.0"
target="//@networks.1/@nodess.1"
host="//@networks.0/@paths.2"/>
</networks>
</network.model:Root>
Loading