Commit 39c249d6 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Add emulab-xen sliver type to Flack

parent f00ee5bc
......@@ -50,6 +50,7 @@ package com.flack.geni.plugins.emulab
SliverTypes.addSliverTypeInterface(RawPcSliverType.TYPE_RAWPC_V1, new RawPcSliverType());
SliverTypes.addSliverTypeInterface(RawPcSliverType.TYPE_RAWPC_V2, new RawPcSliverType());
SliverTypes.addSliverTypeInterface(EmulabOpenVzSliverType.TYPE_EMULABOPENVZ, new EmulabOpenVzSliverType());
SliverTypes.addSliverTypeInterface(EmulabXenSliverType.TYPE_EMULABXEN, new EmulabXenSliverType());
SliverTypes.addSliverTypeInterface(EmulabBbgSliverType.TYPE_EMULAB_BBG, new EmulabBbgSliverType());
SliverTypes.addSliverTypeInterface(EmulabSppSliverType.TYPE_EMULAB_SPP, new EmulabSppSliverType());
SliverTypes.addSliverTypeInterface(Netfpga2SliverType.TYPE_NETFPGA2, new Netfpga2SliverType());
......
/*
* Copyright (c) 2013 University of Utah and the Flux Group.
*
* {{{GENIPUBLIC-LICENSE
*
* GENI Public License
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and/or hardware specification (the "Work") to
* deal in the Work without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Work, and to permit persons to whom the Work
* is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Work.
*
* THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
* IN THE WORK.
*
* }}}
*/
package com.flack.geni.plugins.emulab
{
import com.flack.geni.plugins.SliverTypeInterface;
import com.flack.geni.plugins.SliverTypePart;
import com.flack.geni.resources.physical.PhysicalNode;
import com.flack.geni.resources.virtual.VirtualInterface;
import com.flack.geni.resources.virtual.VirtualNode;
import mx.collections.ArrayCollection;
public class EmulabXenSliverType implements SliverTypeInterface
{
static public const TYPE_EMULABXEN:String = "emulab-xen";
public function EmulabXenSliverType()
{
}
public function get Name():String { return TYPE_EMULABXEN; }
public function get namespace():Namespace
{
return null;
}
public function get schema():String
{
return "";
}
public function get Part():SliverTypePart
{
return null;
}
public function get Clone():SliverTypeInterface
{
var clone:EmulabXenSliverType = new EmulabXenSliverType();
return clone;
}
public function applyToSliverTypeXml(node:VirtualNode, xml:XML):void
{
}
public function applyFromAdvertisedSliverTypeXml(node:PhysicalNode, xml:XML):void
{
}
public function applyFromSliverTypeXml(node:VirtualNode, xml:XML):void
{
}
public function interfaceRemoved(iface:VirtualInterface):void
{
}
public function interfaceAdded(iface:VirtualInterface):void
{
}
public function canAdd(node:VirtualNode):Boolean
{
return true;
}
public function get SimpleList():ArrayCollection
{
return null;
}
}
}
......@@ -32,6 +32,7 @@ package com.flack.geni.resources.sites
import com.flack.geni.plugins.emulab.DelaySliverType;
import com.flack.geni.plugins.emulab.EmulabBbgSliverType;
import com.flack.geni.plugins.emulab.EmulabOpenVzSliverType;
import com.flack.geni.plugins.emulab.EmulabXenSliverType;
import com.flack.geni.plugins.emulab.EmulabSppSliverType;
import com.flack.geni.plugins.emulab.FirewallSliverType;
import com.flack.geni.plugins.emulab.Netfpga2SliverType;
......@@ -139,6 +140,7 @@ package com.flack.geni.resources.sites
case SliverTypes.QEMUPC:
supportsDiskImage = false;
case EmulabOpenVzSliverType.TYPE_EMULABOPENVZ:
case EmulabXenSliverType.TYPE_EMULABXEN:
default:
}
}
......
......@@ -31,6 +31,7 @@ package com.flack.geni.resources.virtual
{
import com.flack.geni.RspecUtil;
import com.flack.geni.plugins.emulab.EmulabOpenVzSliverType;
import com.flack.geni.plugins.emulab.EmulabXenSliverType;
import com.flack.geni.plugins.emulab.Pipe;
import com.flack.geni.plugins.emulab.PipeCollection;
import com.flack.geni.plugins.emulab.RawPcSliverType;
......@@ -95,6 +96,11 @@ package com.flack.geni.resources.virtual
sliverType.name = EmulabOpenVzSliverType.TYPE_EMULABOPENVZ;
sliverType.diskImages = newPhysicalNode.sliverTypes.getByName(EmulabOpenVzSliverType.TYPE_EMULABOPENVZ).diskImages;
}
else if(!newPhysicalNode.exclusive && newPhysicalNode.sliverTypes.getByName(EmulabXenSliverType.TYPE_EMULABXEN) != null)
{
sliverType.name = EmulabXenSliverType.TYPE_EMULABXEN;
sliverType.diskImages = newPhysicalNode.sliverTypes.getByName(EmulabXenSliverType.TYPE_EMULABXEN).diskImages;
}
else if(newPhysicalNode.sliverTypes.length > 0)
{
sliverType.name = newPhysicalNode.sliverTypes.collection[0].name;
......
......@@ -58,7 +58,7 @@ package com.flack.geni.tasks.groups
add(
new HttpTask(
"http://www.emulab.net/rootca.bundle",
"https://www.emulab.net/rootca.bundle",
"Download root bundle",
"Downloads the root cert bundle"
)
......@@ -66,7 +66,7 @@ package com.flack.geni.tasks.groups
add(
new HttpTask(
"http://www.emulab.net/genica.bundle",
"https://www.emulab.net/genica.bundle",
"Download GENI bundle",
"Downloads the GENI cert bundle"
)
......
......@@ -33,6 +33,7 @@ package com.flack.geni.tasks.process
import com.flack.geni.plugins.SliverTypeInterface;
import com.flack.geni.plugins.emulab.EmulabBbgSliverType;
import com.flack.geni.plugins.emulab.EmulabOpenVzSliverType;
import com.flack.geni.plugins.emulab.EmulabXenSliverType;
import com.flack.geni.plugins.emulab.Pipe;
import com.flack.geni.plugins.emulab.RawPcSliverType;
import com.flack.geni.plugins.shadownet.JuniperRouterSliverType;
......@@ -314,6 +315,8 @@ package com.flack.geni.tasks.process
nodeXml.@virtualization_type = "emulab-vnode";
if(node.sliverType.name == EmulabOpenVzSliverType.TYPE_EMULABOPENVZ)
nodeXml.@virtualization_subtype = EmulabOpenVzSliverType.TYPE_EMULABOPENVZ;
if(node.sliverType.name == EmulabXenSliverType.TYPE_EMULABXEN)
nodeXml.@virtualization_subtype = EmulabXenSliverType.TYPE_EMULABXEN;
if(node.sliverType.name == EmulabBbgSliverType.TYPE_EMULAB_BBG)
nodeXml.@virtualization_subtype = EmulabBbgSliverType.TYPE_EMULAB_BBG;
}
......@@ -322,7 +325,8 @@ package com.flack.geni.tasks.process
var nodeType:String = "";
if(node.sliverType.name == RawPcSliverType.TYPE_RAWPC_V2)
nodeType = "pc";
else if(node.sliverType.name == EmulabOpenVzSliverType.TYPE_EMULABOPENVZ)
else if(node.sliverType.name == EmulabOpenVzSliverType.TYPE_EMULABOPENVZ ||
node.sliverType.name == EmulabXenSliverType.TYPE_EMULABXEN)
nodeType = "pcvm";
else if(node.sliverType.name == JuniperRouterSliverType.TYPE_JUNIPER_LROUTER)
nodeType = JuniperRouterSliverType.TYPE_JUNIPER_LROUTER;
......
......@@ -33,6 +33,7 @@ package com.flack.geni.tasks.process
import com.flack.geni.plugins.RspecProcessInterface;
import com.flack.geni.plugins.emulab.EmulabBbgSliverType;
import com.flack.geni.plugins.emulab.EmulabOpenVzSliverType;
import com.flack.geni.plugins.emulab.EmulabXenSliverType;
import com.flack.geni.plugins.emulab.EmulabSppSliverType;
import com.flack.geni.plugins.emulab.Netfpga2SliverType;
import com.flack.geni.plugins.emulab.RawPcSliverType;
......@@ -430,7 +431,9 @@ package com.flack.geni.tasks.process
case "pcvm":
if(node.manager.type != FlackManager.TYPE_PLANETLAB)
{
node.sliverTypes.add(new SliverType(EmulabOpenVzSliverType.TYPE_EMULABOPENVZ));
node.sliverTypes.add(new SliverType(EmulabXenSliverType.TYPE_EMULABXEN));
node.sliverTypes.add(new SliverType(EmulabOpenVzSliverType.TYPE_EMULABOPENVZ));
nodeTypeSliverType = node.sliverTypes.collection[node.sliverTypes.length-1];
}
break;
......@@ -800,4 +803,4 @@ package com.flack.geni.tasks.process
System.disposeXML(xmlDocument);
}
}
}
\ No newline at end of file
}
......@@ -33,6 +33,7 @@ package com.flack.geni.tasks.process
import com.flack.geni.RspecUtil;
import com.flack.geni.plugins.emulab.EmulabBbgSliverType;
import com.flack.geni.plugins.emulab.EmulabOpenVzSliverType;
import com.flack.geni.plugins.emulab.EmulabXenSliverType;
import com.flack.geni.plugins.emulab.RawPcSliverType;
import com.flack.geni.plugins.shadownet.JuniperRouterSliverType;
import com.flack.geni.resources.DiskImage;
......@@ -406,6 +407,9 @@ package com.flack.geni.tasks.process
case EmulabOpenVzSliverType.TYPE_EMULABOPENVZ:
virtualNode.sliverType = new SliverType(EmulabOpenVzSliverType.TYPE_EMULABOPENVZ);
break;
case EmulabXenSliverType.TYPE_EMULABXEN:
virtualNode.sliverType = new SliverType(EmulabXenSliverType.TYPE_EMULABXEN);
break;
case EmulabBbgSliverType.TYPE_EMULAB_BBG:
virtualNode.sliverType = new SliverType(EmulabBbgSliverType.TYPE_EMULAB_BBG);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment