Commit 080bd9f4 authored by Matt Strum's avatar Matt Strum
Browse files

Added support to have numbers in slice names. Fixed ResourceDiscovery not...

Added support to have numbers in slice names.  Fixed ResourceDiscovery not continuing to the next CM if failed.  Cleaned up old code from ComponentManager.
parent 44f487e9
......@@ -35,7 +35,6 @@ package
name = newName;
hostName = newHostName;
url = newUrl;
hrn = newHrn;
ad = "";
manifest = "";
update = newUpdate;
......@@ -508,7 +507,6 @@ package
private var name : String;
private var hostName : String;
private var url : String;
private var hrn : String;
private var ad : String;
private var manifest : String;
......
......@@ -46,7 +46,50 @@ package
public override function getComponent(urn:String, cm:String):String
{
return "READY for " + urn + " on " + cm + "!";
var compm : ComponentManager = null;
var cms : Array = managers.getManagers();
// Get CM
var length:int = cms.length;
for(var i:int = 0; i < length; i++)
{
if( cms[i].name == cm )
{
compm = ComponentManager(cms[i]);
break;
}
}
// Get component
if(compm != null)
{
var index:int = compm.getIndexFromUuid(urn);
if(compm.isUsed(index))
return "Component is being used already";
var component = compm.getComponent(index);
var superNode = null;
var superNodeName = null;
if (component.superNode != -1)
{
if(compm.isUsed(component.superNode))
return "Component's supernode already in use";
superNode = compm.getComponent(component.superNode);
superNodeName = superNode.name;
}
nodes.addNode(component, compm, index,
420, 220, true,
superNodeName);
compm.addUsed(index);
if (superNode != null)
{
nodes.addNode(superNode, compm, component.superNode,
400, 200, false, null);
compm.addUsed(component.superNode);
}
return "Successfully added " + urn + " on " + cm + "!";
} else {
return "Could not find component manager named " + cm;
}
}
override public function cleanup() : void
......
......@@ -36,7 +36,7 @@ package
clip.sliceName.setSelection(0, clip.sliceName.length);
clip.sliceName.alwaysShowSelection = true;
clip.stage.focus = clip.sliceName;
clip.sliceName.restrict = "a-zA-Z";
clip.sliceName.restrict = "a-zA-Z0-9";
clip.stage.addEventListener(KeyboardEvent.KEY_UP, keyUp);
}
......
/* GENIPUBLIC-COPYRIGHT
/* GENIPUBLIC-COPYRIGHT
* Copyright (c) 2008, 2009 University of Utah and the Flux Group.
* All rights reserved.
*
......@@ -43,6 +43,12 @@ package
op.setUrl(cm.getUrl());
return op;
}
override public function fail() : Request
{
cm.resourceFailure();
return next;
}
override public function complete(code : Number, response : Object,
credential : Credential) : Request
......
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