nimbusproject$nimbus
String cmpName
String
String getInstancePublicNetwork(String cmpName)
String cmpName
String
String getInstanceNetwork(String cmpName)
nimbusproject$nimbus
String
String getCustomPublicNetwork()
String
String getCustomNetwork()
nimbusproject$nimbus
String
String getLargePublicNetwork()
String
String getLargeNetwork()
nimbusproject$nimbus
String
String getPublicNetwork()
String
String getNetwork()
nimbusproject$nimbus
String
String getSmallPublicNetwork()
String
String getSmallNetwork()
nimbusproject$nimbus
String
String getXlargePublicNetwork()
String
String getXlargeNetwork()
nimbusproject$nimbus
String customPublicNetwork
void
void setCustomPublicNetwork(String customPublicNetwork)
String customNetwork
void
void setCustomNetwork(String customNetwork)
nimbusproject$nimbus
String largePublicNetwork
void
void setLargePublicNetwork(String largePublicNetwork)
String largeNetwork
void
void setLargeNetwork(String largeNetwork)
nimbusproject$nimbus
String publicNetwork
void
void setPublicNetwork(String publicNetwork)
String network
void
void setNetwork(String network)
nimbusproject$nimbus
String smallPublicNetwork
this.smallPublicNetwork = smallPublicNetwork;
    public void setSmallPrivateNetwork(String smallPrivateNetwork) {
        this.smallPrivateNetwork = smallPrivateNetwork;
    public void setCustomPublicNetwork(String customPublicNetwork) {
        this.customPublicNetwork = customPublicNetwork;
    public void setCustomPrivateNetwork(String customPrivateNetwork) {
        this.customPrivateNetwork = customPrivateNetwork;
void
void setSmallPublicNetwork(String smallPublicNetwork)
String smallNetwork
this.smallNetwork = smallNetwork;
    public void setCustomNetwork(String customNetwork) {
        this.customNetwork = customNetwork;
    public void setLargeNetwork(String largeNetwork) {
        this.largeNetwork = largeNetwork;
    public void setXlargeNetwork(String xlargeNetwork) {
        this.xlargeNetwork = xlargeNetwork;
    public String getSmallNetwork() {
        return this.smallNetwork;
    public String getCustomNetwork() {
        return this.customNetwork;
    public String getLargeNetwork() {
        return this.largeNetwork;
    public String getXlargeNetwork() {
        return this.xlargeNetwork;
    protected String getMatchingName(int memory, int cpus, String network) {
        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallNetwork.equals(network)) {
void
void setSmallNetwork(String smallNetwork)
nimbusproject$nimbus
String xlargePublicNetwork
void
void setXlargePublicNetwork(String xlargePublicNetwork)
String xlargeNetwork
void
void setXlargeNetwork(String xlargeNetwork)
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fetc%2Felastic%2Felastic.conf
https://api.github.com/repos/nimbusproject/nimbus/contents/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fetc%2Felastic%2Felastic.conf?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
messaging/gt4.0-elastic/java/msgbridge/etc/elastic/elastic.conf
# The following two settings are the default for all instances

# The following settings allow to override default setting per instance
# The defaults are used if left blank

network.public.small=
network.private.small=
network.public.large=
network.private.large=
network.public.xlarge=
network.private.xlarge=
network.public.custom=private
network.private.custom=private
network.small=
network.large=
network.xlarge=
network.custom=private

@@ -19,21 +19,29 @@ cpus.large=2
 cpus.xlarge=4
 cpus.custom=1
 
-network.small=
-network.large=
-network.xlarge=
-network.custom=private
-
 # There is a concept of "public" and "private" networks built into the elastic
 # interface.  You need to map these to the real networks to request from the
 # underlying resource manager (workspace service).
 #
 # They can be the same value which will trigger one real NIC request.  If they
 # are different network names, two real NIC requests will be made.
 
+# The following two settings are the default for all instances
+
 net.public=public
 net.private=private
 
+# The following settings allow to override default setting per instance
+# The defaults are used if left blank
+
+network.public.small=
+network.private.small=
+network.public.large=
+network.private.large=
+network.public.xlarge=
+network.private.xlarge=
+network.public.custom=private
+network.private.custom=private
 
 # The default VMM to request from the underlying manager is x86+Xen3, see the
 # "elastic/other/other-elastic.conf" to change this.
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fetc%2Felastic%2Felastic.conf
75f7dee80731e5e47258e10faee4f6f030a94617
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fetc%2Felastic%2Fother%2Fmain.xml
https://api.github.com/repos/nimbusproject/nimbus/contents/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fetc%2Felastic%2Fother%2Fmain.xml?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
messaging/gt4.0-elastic/java/msgbridge/etc/elastic/other/main.xml
         <property name="smallPublicNetwork" value="$ELASTIC{network.public.small}" />
         <property name="smallPrivateNetwork" value="$ELASTIC{network.private.small}" />
         <property name="largePublicNetwork" value="$ELASTIC{network.public.large}" />
         <property name="largePrivateNetwork" value="$ELASTIC{network.private.large}" />
         <property name="xlargePublicNetwork" value="$ELASTIC{network.public.xlarge}" />
         <property name="xlargePrivateNetwork" value="$ELASTIC{network.private.xlarge}" />
         <property name="customPublicNetwork" value="$ELASTIC{network.public.custom}" />
         <property name="customPrivateNetwork" value="$ELASTIC{network.private.custom}" />
         <property name="smallNetwork" value="$ELASTIC{network.small}" />
         <property name="largeNetwork" value="$ELASTIC{network.large}" />
         <property name="xlargeNetwork" value="$ELASTIC{network.xlarge}" />
         <property name="customNetwork" value="$ELASTIC{network.custom}" />
@@ -142,10 +142,14 @@
 
          <constructor-arg ref="nimbus-elastic.rm.modulelocator" />
 
-         <property name="smallNetwork" value="$ELASTIC{network.small}" />
-         <property name="largeNetwork" value="$ELASTIC{network.large}" />
-         <property name="xlargeNetwork" value="$ELASTIC{network.xlarge}" />
-         <property name="customNetwork" value="$ELASTIC{network.custom}" />
+         <property name="smallPublicNetwork" value="$ELASTIC{network.public.small}" />
+         <property name="smallPrivateNetwork" value="$ELASTIC{network.private.small}" />
+         <property name="largePublicNetwork" value="$ELASTIC{network.public.large}" />
+         <property name="largePrivateNetwork" value="$ELASTIC{network.private.large}" />
+         <property name="xlargePublicNetwork" value="$ELASTIC{network.public.xlarge}" />
+         <property name="xlargePrivateNetwork" value="$ELASTIC{network.private.xlarge}" />
+         <property name="customPublicNetwork" value="$ELASTIC{network.public.custom}" />
+         <property name="customPrivateNetwork" value="$ELASTIC{network.private.custom}" />
 
          <property name="smallMemory" value="$ELASTIC{memory.small}" /> 
          <property name="largeMemory" value="$ELASTIC{memory.large}" />
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fetc%2Felastic%2Fother%2Fmain.xml
e4c7fa8e7a189041cb1f6dc5ae528099696b99b2
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Fgeneral%2Fdefaults%2FDefaultResourceAllocations.java
https://api.github.com/repos/nimbusproject/nimbus/contents/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Fgeneral%2Fdefaults%2FDefaultResourceAllocations.java?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
    protected String smallPublicNetwork = null;
    protected String smallPrivateNetwork = null;
    protected String largePublicNetwork = null;
    protected String largePrivateNetwork = null;
    protected String xlargePublicNetwork = null;
    protected String xlargePrivateNetwork = null;
    protected String customPublicNetwork = null;
    protected String customPrivateNetwork = null;
    public void setSmallPublicNetwork(String smallPublicNetwork) {
        this.smallPublicNetwork = smallPublicNetwork;
    public void setSmallPrivateNetwork(String smallPrivateNetwork) {
        this.smallPrivateNetwork = smallPrivateNetwork;
    public void setCustomPublicNetwork(String customPublicNetwork) {
        this.customPublicNetwork = customPublicNetwork;
    public void setCustomPrivateNetwork(String customPrivateNetwork) {
        this.customPrivateNetwork = customPrivateNetwork;
    }

    public void setLargePublicNetwork(String largePublicNetwork) {
        this.largePublicNetwork = largePublicNetwork;
    }

    public void setLargePrivateNetwork(String largePrivateNetwork) {
        this.largePrivateNetwork = largePrivateNetwork;
    }

    public void setXlargePublicNetwork(String xlargePublicNetwork) {
        this.xlargePublicNetwork = xlargePublicNetwork;
    }

    public void setXlargePrivateNetwork(String xlargePrivateNetwork) {
        this.xlargePrivateNetwork = xlargePrivateNetwork;
    public String getSmallPublicNetwork() {
        return this.smallPublicNetwork;
    }

    public String getSmallPrivateNetwork() {
        return this.smallPrivateNetwork;
    }

    public String getCustomPublicNetwork() {
        return this.customPublicNetwork;
    }

    public String getCustomPrivateNetwork() {
        return this.customPrivateNetwork;
    public String getLargePublicNetwork() {
        return this.largePublicNetwork;
    public String getLargePrivateNetwork() {
        return this.largePrivateNetwork;
    public String getXlargePublicNetwork() {
        return this.xlargePublicNetwork;
    }

    public String getXlargePrivateNetwork() {
        return this.xlargePrivateNetwork;
    protected String getMatchingName(int memory, int cpus, String publicNetwork, String privateNetwork) {
        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallPublicNetwork.equals(publicNetwork) && this.smallPrivateNetwork.equals(privateNetwork)) {
        } else if (this.largeMemory == memory && this.largeCPUs == cpus && this.largePublicNetwork.equals(publicNetwork) && this.largePrivateNetwork.equals(privateNetwork)) {
        } else if (this.xlargeMemory == memory && this.xlargeCPUs == cpus && this.xlargePublicNetwork.equals(publicNetwork) && this.xlargePrivateNetwork.equals(privateNetwork)) {
        } else if (this.customMemory == memory && this.customCPUs == cpus && this.customPublicNetwork.equals(publicNetwork) && this.customPrivateNetwork.equals(privateNetwork)) {
        String publicNetwork = ra.getPublicNetwork();
        if (publicNetwork == null) {
                publicNetwork = "";
        }
        String privateNetwork = ra.getPrivateNetwork();
        if (privateNetwork == null) {
                privateNetwork = "";
        return this.getMatchingName(ra.getMemory(), ra.getIndCpuCount(), publicNetwork, privateNetwork);
        String publicNetwork = getInstancePublicNetwork(cmpName);
        String privateNetwork = getInstancePrivateNetwork(cmpName);
        ra.setPublicNetwork(publicNetwork);
        ra.setPrivateNetwork(privateNetwork);
    protected String getInstancePublicNetwork(final String cmpName)
            return this.smallPublicNetwork;
            return this.largePublicNetwork;
            return this.xlargePublicNetwork;
            return this.customPublicNetwork;
    protected String getInstancePrivateNetwork(final String cmpName)
            throws CannotTranslateException {
        if (cmpName.equals(this.getSmallName())) {
            return this.smallPrivateNetwork;
        } else if (cmpName.equals(this.getLargeName())) {
            return this.largePrivateNetwork;
        } else if (cmpName.equals(this.getXlargeName())) {
            return this.xlargePrivateNetwork;
        } else if (cmpName.equals(this.getCustomName())) {
            return this.customPrivateNetwork;
        } else {
            throw new CannotTranslateException(
                    "Unknown instance type '" + cmpName + "'");
        }
    }
String smallPublicNetwork
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
this.smallPublicNetwork = smallPublicNetwork;
    public void setSmallPrivateNetwork(String smallPrivateNetwork) {
        this.smallPrivateNetwork = smallPrivateNetwork;
    public void setCustomPublicNetwork(String customPublicNetwork) {
        this.customPublicNetwork = customPublicNetwork;
    public void setCustomPrivateNetwork(String customPrivateNetwork) {
        this.customPrivateNetwork = customPrivateNetwork;
void setSmallPublicNetwork(String smallPublicNetwork)
String largePublicNetwork
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
this.largePublicNetwork = largePublicNetwork;
void setLargePublicNetwork(String largePublicNetwork)
String largePrivateNetwork
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
this.largePrivateNetwork = largePrivateNetwork;
void setLargePrivateNetwork(String largePrivateNetwork)
String xlargePublicNetwork
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
this.xlargePublicNetwork = xlargePublicNetwork;
void setXlargePublicNetwork(String xlargePublicNetwork)
String xlargePrivateNetwork
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
this.xlargePrivateNetwork = xlargePrivateNetwork;
    public String getSmallPublicNetwork() {
        return this.smallPublicNetwork;
void setXlargePrivateNetwork(String xlargePrivateNetwork)
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
return this.smallPrivateNetwork;
String getSmallPrivateNetwork()
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
return this.customPublicNetwork;
String getCustomPublicNetwork()
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
return this.customPrivateNetwork;
    public String getLargePublicNetwork() {
        return this.largePublicNetwork;
    public String getLargePrivateNetwork() {
        return this.largePrivateNetwork;
    public String getXlargePublicNetwork() {
        return this.xlargePublicNetwork;
String getCustomPrivateNetwork()
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
return this.xlargePrivateNetwork;
    protected String getMatchingName(int memory, int cpus, String publicNetwork, String privateNetwork) {
        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallPublicNetwork.equals(publicNetwork) && this.smallPrivateNetwork.equals(privateNetwork)) {
String getXlargePrivateNetwork()
    protected String smallNetwork = null;
    protected String largeNetwork = null;
    protected String xlargeNetwork = null;
    protected String customNetwork = null;
    public void setSmallNetwork(String smallNetwork) {
        this.smallNetwork = smallNetwork;
    public void setCustomNetwork(String customNetwork) {
        this.customNetwork = customNetwork;
    public void setLargeNetwork(String largeNetwork) {
        this.largeNetwork = largeNetwork;
    public void setXlargeNetwork(String xlargeNetwork) {
        this.xlargeNetwork = xlargeNetwork;
    public String getSmallNetwork() {
        return this.smallNetwork;
    public String getCustomNetwork() {
        return this.customNetwork;
    public String getLargeNetwork() {
        return this.largeNetwork;
    public String getXlargeNetwork() {
        return this.xlargeNetwork;
    protected String getMatchingName(int memory, int cpus, String network) {
        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallNetwork.equals(network)) {
        } else if (this.largeMemory == memory && this.largeCPUs == cpus && this.largeNetwork.equals(network)) {
        } else if (this.xlargeMemory == memory && this.xlargeCPUs == cpus && this.xlargeNetwork.equals(network)) {
        } else if (this.customMemory == memory && this.customCPUs == cpus && this.customNetwork.equals(network)) {
        String network = ra.getNetwork();
        if (network == null) {
                network = "";
        return this.getMatchingName(ra.getMemory(), ra.getIndCpuCount(), network);
        String network = getInstanceNetwork(cmpName);
        ra.setNetwork(network);
    protected String getInstanceNetwork(final String cmpName)
            return this.smallNetwork;
            return this.largeNetwork;
            return this.xlargeNetwork;
            return this.customNetwork;
String smallNetwork
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java
this.smallNetwork = smallNetwork;
    public void setCustomNetwork(String customNetwork) {
        this.customNetwork = customNetwork;
    public void setLargeNetwork(String largeNetwork) {
        this.largeNetwork = largeNetwork;
    public void setXlargeNetwork(String xlargeNetwork) {
        this.xlargeNetwork = xlargeNetwork;
    public String getSmallNetwork() {
        return this.smallNetwork;
    public String getCustomNetwork() {
        return this.customNetwork;
    public String getLargeNetwork() {
        return this.largeNetwork;
    public String getXlargeNetwork() {
        return this.xlargeNetwork;
    protected String getMatchingName(int memory, int cpus, String network) {
        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallNetwork.equals(network)) {
void setSmallNetwork(String smallNetwork)
@@ -62,10 +62,14 @@ public class DefaultResourceAllocations implements ResourceAllocations {
     protected String xlargeName;
     protected String customName;
 
-    protected String smallNetwork = null;
-    protected String largeNetwork = null;
-    protected String xlargeNetwork = null;
-    protected String customNetwork = null;
+    protected String smallPublicNetwork = null;
+    protected String smallPrivateNetwork = null;
+    protected String largePublicNetwork = null;
+    protected String largePrivateNetwork = null;
+    protected String xlargePublicNetwork = null;
+    protected String xlargePrivateNetwork = null;
+    protected String customPublicNetwork = null;
+    protected String customPrivateNetwork = null;
 
     protected String unknownString;
 
@@ -165,20 +169,36 @@ void validate() throws Exception {
     // -------------------------------------------------------------------------
     // SET
     // -------------------------------------------------------------------------
-    public void setSmallNetwork(String smallNetwork) {
-        this.smallNetwork = smallNetwork;
+    public void setSmallPublicNetwork(String smallPublicNetwork) {
+        this.smallPublicNetwork = smallPublicNetwork;
     }
 
-    public void setCustomNetwork(String customNetwork) {
-        this.customNetwork = customNetwork;
+    public void setSmallPrivateNetwork(String smallPrivateNetwork) {
+        this.smallPrivateNetwork = smallPrivateNetwork;
     }
 
-    public void setLargeNetwork(String largeNetwork) {
-        this.largeNetwork = largeNetwork;
+    public void setCustomPublicNetwork(String customPublicNetwork) {
+        this.customPublicNetwork = customPublicNetwork;
     }
 
-    public void setXlargeNetwork(String xlargeNetwork) {
-        this.xlargeNetwork = xlargeNetwork;
+    public void setCustomPrivateNetwork(String customPrivateNetwork) {
+        this.customPrivateNetwork = customPrivateNetwork;
+    }
+
+    public void setLargePublicNetwork(String largePublicNetwork) {
+        this.largePublicNetwork = largePublicNetwork;
+    }
+
+    public void setLargePrivateNetwork(String largePrivateNetwork) {
+        this.largePrivateNetwork = largePrivateNetwork;
+    }
+
+    public void setXlargePublicNetwork(String xlargePublicNetwork) {
+        this.xlargePublicNetwork = xlargePublicNetwork;
+    }
+
+    public void setXlargePrivateNetwork(String xlargePrivateNetwork) {
+        this.xlargePrivateNetwork = xlargePrivateNetwork;
     }
 
     public void setCustomMemory(int customMemory) {
@@ -263,20 +283,36 @@ public void setSiType(String siType) throws Exception {
     // -------------------------------------------------------------------------
     // implements ResourceAllocations
     // -------------------------------------------------------------------------
-    public String getSmallNetwork() {
-        return this.smallNetwork;
+    public String getSmallPublicNetwork() {
+        return this.smallPublicNetwork;
+    }
+
+    public String getSmallPrivateNetwork() {
+        return this.smallPrivateNetwork;
+    }
+
+    public String getCustomPublicNetwork() {
+        return this.customPublicNetwork;
+    }
+
+    public String getCustomPrivateNetwork() {
+        return this.customPrivateNetwork;
     }
 
-    public String getCustomNetwork() {
-        return this.customNetwork;
+    public String getLargePublicNetwork() {
+        return this.largePublicNetwork;
     }
 
-    public String getLargeNetwork() {
-        return this.largeNetwork;
+    public String getLargePrivateNetwork() {
+        return this.largePrivateNetwork;
     }
 
-    public String getXlargeNetwork() {
-        return this.xlargeNetwork;
+    public String getXlargePublicNetwork() {
+        return this.xlargePublicNetwork;
+    }
+
+    public String getXlargePrivateNetwork() {
+        return this.xlargePrivateNetwork;
     }
 
     public String getSpotInstanceType(){
@@ -311,14 +347,14 @@ public String getVmmVersion() {
         return this.vmmVersion;
     }
 
-    protected String getMatchingName(int memory, int cpus, String network) {
-        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallNetwork.equals(network)) {
+    protected String getMatchingName(int memory, int cpus, String publicNetwork, String privateNetwork) {
+        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallPublicNetwork.equals(publicNetwork) && this.smallPrivateNetwork.equals(privateNetwork)) {
             return this.getSmallName();
-        } else if (this.largeMemory == memory && this.largeCPUs == cpus && this.largeNetwork.equals(network)) {
+        } else if (this.largeMemory == memory && this.largeCPUs == cpus && this.largePublicNetwork.equals(publicNetwork) && this.largePrivateNetwork.equals(privateNetwork)) {
             return this.getLargeName();
-        } else if (this.xlargeMemory == memory && this.xlargeCPUs == cpus && this.xlargeNetwork.equals(network)) {
+        } else if (this.xlargeMemory == memory && this.xlargeCPUs == cpus && this.xlargePublicNetwork.equals(publicNetwork) && this.xlargePrivateNetwork.equals(privateNetwork)) {
             return this.getXlargeName();
-        } else if (this.customMemory == memory && this.customCPUs == cpus && this.customNetwork.equals(network)) {
+        } else if (this.customMemory == memory && this.customCPUs == cpus && this.customPublicNetwork.equals(publicNetwork) && this.customPrivateNetwork.equals(privateNetwork)) {
             return this.getCustomName();
         } else {
             return this.unknownString;
@@ -333,12 +369,16 @@ public String getMatchingName(ResourceAllocation ra)
         }
 
         // Undefined networks in elastic.conf are declared with empty strings
-        String network = ra.getNetwork();
-        if (network == null) {
-                network = "";
+        String publicNetwork = ra.getPublicNetwork();
+        if (publicNetwork == null) {
+                publicNetwork = "";
+        }
+        String privateNetwork = ra.getPrivateNetwork();
+        if (privateNetwork == null) {
+                privateNetwork = "";
         }
 
-        return this.getMatchingName(ra.getMemory(), ra.getIndCpuCount(), network);
+        return this.getMatchingName(ra.getMemory(), ra.getIndCpuCount(), publicNetwork, privateNetwork);
     }
 
     public ResourceAllocation getMatchingRA(String name,
@@ -370,15 +410,17 @@ public ResourceAllocation getMatchingRA(String name,
 
         Integer cpus = getInstanceCPUs(cmpName);
 
-        String network = getInstanceNetwork(cmpName);
+        String publicNetwork = getInstancePublicNetwork(cmpName);
+        String privateNetwork = getInstancePrivateNetwork(cmpName);
 
         ra.setIndCpuCount(cpus);
 
         ra.setSpotInstance(spot);
         
         ra.setArchitecture(this.cpuArch);
 
-        ra.setNetwork(network);
+        ra.setPublicNetwork(publicNetwork);
+        ra.setPrivateNetwork(privateNetwork);
 
         return ra;
     }
@@ -415,22 +457,37 @@ protected Integer getInstanceCPUs(final String cmpName)
         }
     }
 
-    protected String getInstanceNetwork(final String cmpName)
+    protected String getInstancePublicNetwork(final String cmpName)
             throws CannotTranslateException {
         if (cmpName.equals(this.getSmallName())) {
-            return this.smallNetwork;
+            return this.smallPublicNetwork;
         } else if (cmpName.equals(this.getLargeName())) {
-            return this.largeNetwork;
+            return this.largePublicNetwork;
         } else if (cmpName.equals(this.getXlargeName())) {
-            return this.xlargeNetwork;
+            return this.xlargePublicNetwork;
         } else if (cmpName.equals(this.getCustomName())) {
-            return this.customNetwork;
+            return this.customPublicNetwork;
         } else {
             throw new CannotTranslateException(
                     "Unknown instance type '" + cmpName + "'");
         }
     }
 
+    protected String getInstancePrivateNetwork(final String cmpName)
+            throws CannotTranslateException {
+        if (cmpName.equals(this.getSmallName())) {
+            return this.smallPrivateNetwork;
+        } else if (cmpName.equals(this.getLargeName())) {
+            return this.largePrivateNetwork;
+        } else if (cmpName.equals(this.getXlargeName())) {
+            return this.xlargePrivateNetwork;
+        } else if (cmpName.equals(this.getCustomName())) {
+            return this.customPrivateNetwork;
+        } else {
+            throw new CannotTranslateException(
+                    "Unknown instance type '" + cmpName + "'");
+        }
+    }
 
     public RequiredVMM getRequiredVMM() {
         return this.requestThisVMM;
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Fgeneral%2Fdefaults%2FDefaultResourceAllocations.java
225012283d4a928c7ebfefc3d56cda0c1956e6c7
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Frm%2Fdefaults%2FDefaultRequestSI.java
https://api.github.com/repos/nimbusproject/nimbus/contents/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Frm%2Fdefaults%2FDefaultRequestSI.java?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultRequestSI.java
        final NIC[] nics = this.getNICs(ra.getPublicNetwork(), ra.getPrivateNetwork());
        final NIC[] nics = this.getNICs(ra.getNetwork());
@@ -199,7 +199,7 @@ public SpotCreateRequest translateReqSpotInstances(
                                                              req.getInstanceCount().intValue(),
                                                              req.getInstanceCount().intValue(),
                                                              true);
-        final NIC[] nics = this.getNICs(ra.getNetwork());
+        final NIC[] nics = this.getNICs(ra.getPublicNetwork(), ra.getPrivateNetwork());
 
         final RequiredVMM reqVMM = this.RAs.getRequiredVMM();
 
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Frm%2Fdefaults%2FDefaultRequestSI.java
94fef641133ac4b807686437a474773e2e366ace
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Frm%2Fdefaults%2FDefaultRun.java
https://api.github.com/repos/nimbusproject/nimbus/contents/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Frm%2Fdefaults%2FDefaultRun.java?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/rm/defaults/DefaultRun.java
        final NIC[] nics = this.getNICs(ra.getPublicNetwork(), ra.getPrivateNetwork());
    protected NIC[] getNICs(String publicNetworkName, String privateNetworkName) throws CannotTranslateException {

        /* Check that when one of public and private is set, they are both set */
        if (publicNetworkName != null && !publicNetworkName.trim().equals("")) {
            if (privateNetworkName == null || privateNetworkName.trim().equals("")) {
                throw new CannotTranslateException("Illegal Networks " +
                        "implementation, public network set but null private network mapping");
            }
        }
        if (privateNetworkName != null && !privateNetworkName.trim().equals("")) {
            if (publicNetworkName == null || publicNetworkName.trim().equals("")) {
                throw new CannotTranslateException("Illegal Networks " +
                        "implementation, private network set but null public network mapping");
            }
        }

        if (publicNetworkName != null && !publicNetworkName.trim().equals("")) {
            if (publicNetworkName.trim().equals(privateNetworkName.trim())) {
                nics = new NIC[1];
                publicNetworkName = publicNetworkName.trim();
                logger.info("Using network name " + publicNetworkName);
                nics[0] = this.oneRequestedNIC(publicNetworkName, "autoeth0");
            } else {
                nics = new NIC[2];
                publicNetworkName = publicNetworkName.trim();
                privateNetworkName = privateNetworkName.trim();
                logger.info("Using public network name " + publicNetworkName + " and private network name " + privateNetworkName);
                nics[0] = this.oneRequestedNIC(publicNetworkName, "autoeth0");
                nics[1] = this.oneRequestedNIC(privateNetworkName, "autoeth1");
            }
        if (netName2 != null) {
            logger.info("Using networks " + netName + " and " + netName2);
        } else {
            logger.info("Using network " + netName);
        }
        final NIC[] nics = this.getNICs(ra.getNetwork());
    protected NIC[] getNICs(String networkName) throws CannotTranslateException {
        if (networkName != null && !networkName.trim().equals("")) {
            nics = new NIC[1];
            networkName = networkName.trim();
            logger.info("Using network name " + networkName);
            nics[0] = this.oneRequestedNIC(networkName, "autoeth0");
        logger.info("Using network " + netName);
@@ -188,7 +188,7 @@ public CreateRequest translateRunInstances(RunInstancesType req,
                                                              req.getMinCount(),
                                                              req.getMaxCount(),
                                                              false);
-        final NIC[] nics = this.getNICs(ra.getNetwork());
+        final NIC[] nics = this.getNICs(ra.getPublicNetwork(), ra.getPrivateNetwork());
         final RequiredVMM reqVMM = this.RAs.getRequiredVMM();
 
         String userData = null;
@@ -351,7 +351,7 @@ public RunInstancesResponseType translateCreateResult(CreateResult result,
     // NETWORK REQUEST
     // -------------------------------------------------------------------------
 
-    protected NIC[] getNICs(String networkName) throws CannotTranslateException {
+    protected NIC[] getNICs(String publicNetworkName, String privateNetworkName) throws CannotTranslateException {
 
         // if the network mappings are the same value, that currently means
         // only make one real NIC request
@@ -365,11 +365,35 @@ protected NIC[] getNICs(String networkName) throws CannotTranslateException {
         }
 
         final NIC[] nics;
-        if (networkName != null && !networkName.trim().equals("")) {
-            nics = new NIC[1];
-            networkName = networkName.trim();
-            logger.info("Using network name " + networkName);
-            nics[0] = this.oneRequestedNIC(networkName, "autoeth0");
+
+        /* Check that when one of public and private is set, they are both set */
+        if (publicNetworkName != null && !publicNetworkName.trim().equals("")) {
+            if (privateNetworkName == null || privateNetworkName.trim().equals("")) {
+                throw new CannotTranslateException("Illegal Networks " +
+                        "implementation, public network set but null private network mapping");
+            }
+        }
+        if (privateNetworkName != null && !privateNetworkName.trim().equals("")) {
+            if (publicNetworkName == null || publicNetworkName.trim().equals("")) {
+                throw new CannotTranslateException("Illegal Networks " +
+                        "implementation, private network set but null public network mapping");
+            }
+        }
+
+        if (publicNetworkName != null && !publicNetworkName.trim().equals("")) {
+            if (publicNetworkName.trim().equals(privateNetworkName.trim())) {
+                nics = new NIC[1];
+                publicNetworkName = publicNetworkName.trim();
+                logger.info("Using network name " + publicNetworkName);
+                nics[0] = this.oneRequestedNIC(publicNetworkName, "autoeth0");
+            } else {
+                nics = new NIC[2];
+                publicNetworkName = publicNetworkName.trim();
+                privateNetworkName = privateNetworkName.trim();
+                logger.info("Using public network name " + publicNetworkName + " and private network name " + privateNetworkName);
+                nics[0] = this.oneRequestedNIC(publicNetworkName, "autoeth0");
+                nics[1] = this.oneRequestedNIC(privateNetworkName, "autoeth1");
+            }
         }
         else if (pubNet.equals(privNet)) {
             nics = new NIC[1];
@@ -541,7 +565,11 @@ protected void handleNetworking(VM vm,
         String privateAssignedIp = null;
         String publicAssignedIp = null;
 
-        logger.info("Using network " + netName);
+        if (netName2 != null) {
+            logger.info("Using networks " + netName + " and " + netName2);
+        } else {
+            logger.info("Using network " + netName);
+        }
         if (this.networks.isPrivateNetwork(netName)) {
             riit.setPrivateDnsName(hostname);
             riit.setPrivateIpAddress(ipAddress);
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fgt4.0-elastic%2Fjava%2Fmsgbridge%2Fsrc%2Forg%2Fnimbustools%2Fmessaging%2Fgt4_0_elastic%2Fv2008_05_05%2Frm%2Fdefaults%2FDefaultRun.java
fb16c808b8fd5ffadf2e8932e379ff751b9dbd26
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fquery%2Fjava%2Fsource%2Fetc%2Fquery%2Fother%2Fmain.xml
https://api.github.com/repos/nimbusproject/nimbus/contents/messaging%2Fquery%2Fjava%2Fsource%2Fetc%2Fquery%2Fother%2Fmain.xml?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
messaging/query/java/source/etc/query/other/main.xml
         <property name="smallPublicNetwork" value="$ELASTIC{network.public.small}" />
         <property name="smallPrivateNetwork" value="$ELASTIC{network.private.small}" />
         <property name="largePublicNetwork" value="$ELASTIC{network.public.large}" />
         <property name="largePrivateNetwork" value="$ELASTIC{network.private.large}" />
         <property name="xlargePublicNetwork" value="$ELASTIC{network.public.xlarge}" />
         <property name="xlargePrivateNetwork" value="$ELASTIC{network.private.xlarge}" />
         <property name="customPublicNetwork" value="$ELASTIC{network.public.custom}" />
         <property name="customPrivateNetwork" value="$ELASTIC{network.private.custom}" />
         <property name="smallNetwork" value="$ELASTIC{network.small}" />
         <property name="largeNetwork" value="$ELASTIC{network.large}" />
         <property name="xlargeNetwork" value="$ELASTIC{network.xlarge}" />
         <property name="customNetwork" value="$ELASTIC{network.custom}" />
@@ -223,10 +223,14 @@ http://cxf.apache.org/schemas/jaxrs.xsd">
 
          <constructor-arg ref="nimbus-query.rm.modulelocator" />
 
-         <property name="smallNetwork" value="$ELASTIC{network.small}" />
-         <property name="largeNetwork" value="$ELASTIC{network.large}" />
-         <property name="xlargeNetwork" value="$ELASTIC{network.xlarge}" />
-         <property name="customNetwork" value="$ELASTIC{network.custom}" />
+         <property name="smallPublicNetwork" value="$ELASTIC{network.public.small}" />
+         <property name="smallPrivateNetwork" value="$ELASTIC{network.private.small}" />
+         <property name="largePublicNetwork" value="$ELASTIC{network.public.large}" />
+         <property name="largePrivateNetwork" value="$ELASTIC{network.private.large}" />
+         <property name="xlargePublicNetwork" value="$ELASTIC{network.public.xlarge}" />
+         <property name="xlargePrivateNetwork" value="$ELASTIC{network.private.xlarge}" />
+         <property name="customPublicNetwork" value="$ELASTIC{network.public.custom}" />
+         <property name="customPrivateNetwork" value="$ELASTIC{network.private.custom}" />
 
          <property name="smallMemory" value="$ELASTIC{memory.small}" />
          <property name="largeMemory" value="$ELASTIC{memory.large}" />
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/messaging%2Fquery%2Fjava%2Fsource%2Fetc%2Fquery%2Fother%2Fmain.xml
ef6645e7310342f1b19a0d67f4e6e038665b7047
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2F_repr%2Fvm%2F_ResourceAllocation.java
https://api.github.com/repos/nimbusproject/nimbus/contents/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2F_repr%2Fvm%2F_ResourceAllocation.java?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
service-api/java/source/src/org/nimbustools/api/_repr/vm/_ResourceAllocation.java
    public void setPublicNetwork(String network);
    public void setPrivateNetwork(String network);
    public void setNetwork(String network);
@@ -27,5 +27,6 @@ public interface _ResourceAllocation extends ResourceAllocation {
     public void setMemory(int memory);
     public void setNodeNumber(int nodeNumber);
     public void setSpotInstance(boolean spot);
-    public void setNetwork(String network);
+    public void setPublicNetwork(String network);
+    public void setPrivateNetwork(String network);
 }
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2F_repr%2Fvm%2F_ResourceAllocation.java
96305685547bcb2961995c60fb17db205560c321
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2Fdefaults%2Frepr%2Fvm%2FDefaultResourceAllocation.java
https://api.github.com/repos/nimbusproject/nimbus/contents/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2Fdefaults%2Frepr%2Fvm%2FDefaultResourceAllocation.java?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultResourceAllocation.java
    private String publicNetwork;
    private String privateNetwork;
    public String getPublicNetwork() {
        return this.publicNetwork;
    public String getPrivateNetwork() {
        return this.privateNetwork;
    }
    public void setPublicNetwork(String publicNetwork) {
        this.publicNetwork = publicNetwork;
    }

    public void setPrivateNetwork(String privateNetwork) {
        this.privateNetwork = privateNetwork;
service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultResourceAllocation.java
return this.publicNetwork;
    public String getPrivateNetwork() {
        return this.privateNetwork;
String getPublicNetwork()
String publicNetwork
service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultResourceAllocation.java
this.publicNetwork = publicNetwork;
void setPublicNetwork(String publicNetwork)
    private String network;
    public String getNetwork() {
        return this.network;
    public void setNetwork(String network) {
        this.network = network;
@@ -31,7 +31,8 @@ public class DefaultResourceAllocation implements _ResourceAllocation {
     private int memory;
     private int nodeNumber;
     private boolean spotInstance;
-    private String network;
+    private String publicNetwork;
+    private String privateNetwork;
 
     // -------------------------------------------------------------------------
     // implements org.nimbustools.api.repr.vm.ResourceAllocation
@@ -49,10 +50,13 @@ public int getIndCpuCount() {
         return this.indCpuCount;
     }
 
-    public String getNetwork() {
-        return this.network;
+    public String getPublicNetwork() {
+        return this.publicNetwork;
     }
 
+    public String getPrivateNetwork() {
+        return this.privateNetwork;
+    }
 
     public int getCpuPercentage() {
         return this.cpuPercentage;
@@ -94,8 +98,12 @@ public void setMemory(int memory) {
         this.memory = memory;
     }
 
-    public void setNetwork(String network) {
-        this.network = network;
+    public void setPublicNetwork(String publicNetwork) {
+        this.publicNetwork = publicNetwork;
+    }
+
+    public void setPrivateNetwork(String privateNetwork) {
+        this.privateNetwork = privateNetwork;
     }
 
     public void setNodeNumber(int nodeNumber) {
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2Fdefaults%2Frepr%2Fvm%2FDefaultResourceAllocation.java
e61813520cecb59f003dffc4178457c7795fc15a
modified
https://github.com/nimbusproject/nimbus/blob/02e22b24a77665fb2eab634322ed84dc4b41f9dd/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2Frepr%2Fvm%2FResourceAllocation.java
https://api.github.com/repos/nimbusproject/nimbus/contents/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2Frepr%2Fvm%2FResourceAllocation.java?ref=02e22b24a77665fb2eab634322ed84dc4b41f9dd
service-api/java/source/src/org/nimbustools/api/repr/vm/ResourceAllocation.java
    public String getPublicNetwork();
    public String getPrivateNetwork();
    public String getNetwork();
@@ -36,5 +36,6 @@ public interface ResourceAllocation {
     public int getMemory();
     public int getNodeNumber();
     public boolean isSpotInstance();
-    public String getNetwork();
+    public String getPublicNetwork();
+    public String getPrivateNetwork();
 }
https://github.com/nimbusproject/nimbus/raw/02e22b24a77665fb2eab634322ed84dc4b41f9dd/service-api%2Fjava%2Fsource%2Fsrc%2Forg%2Fnimbustools%2Fapi%2Frepr%2Fvm%2FResourceAllocation.java
11b7d5953c79df9492cea24234f93fe747ada9d0
modified
nimbusproject$nimbus
String smallPublicNetwork
this.smallPublicNetwork = smallPublicNetwork;
    public void setSmallPrivateNetwork(String smallPrivateNetwork) {
        this.smallPrivateNetwork = smallPrivateNetwork;
    public void setCustomPublicNetwork(String customPublicNetwork) {
        this.customPublicNetwork = customPublicNetwork;
    public void setCustomPrivateNetwork(String customPrivateNetwork) {
        this.customPrivateNetwork = customPrivateNetwork;
void
void setSmallPublicNetwork(String smallPublicNetwork)
String smallNetwork
this.smallNetwork = smallNetwork;
    public void setCustomNetwork(String customNetwork) {
        this.customNetwork = customNetwork;
    public void setLargeNetwork(String largeNetwork) {
        this.largeNetwork = largeNetwork;
    public void setXlargeNetwork(String xlargeNetwork) {
        this.xlargeNetwork = xlargeNetwork;
    public String getSmallNetwork() {
        return this.smallNetwork;
    public String getCustomNetwork() {
        return this.customNetwork;
    public String getLargeNetwork() {
        return this.largeNetwork;
    public String getXlargeNetwork() {
        return this.xlargeNetwork;
    protected String getMatchingName(int memory, int cpus, String network) {
        if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallNetwork.equals(network)) {
void
void setSmallNetwork(String smallNetwork)