pydev-cvs Mailing List for PyDev for Eclipse (Page 306)
Brought to you by:
fabioz
You can subscribe to this list here.
2004 |
Jan
|
Feb
(4) |
Mar
(48) |
Apr
(56) |
May
(64) |
Jun
(27) |
Jul
(66) |
Aug
(81) |
Sep
(148) |
Oct
(194) |
Nov
(78) |
Dec
(46) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(125) |
Feb
(126) |
Mar
(163) |
Apr
(133) |
May
(115) |
Jun
(307) |
Jul
(387) |
Aug
(417) |
Sep
(283) |
Oct
(148) |
Nov
(45) |
Dec
(53) |
2006 |
Jan
(240) |
Feb
(200) |
Mar
(267) |
Apr
(231) |
May
(245) |
Jun
(361) |
Jul
(142) |
Aug
(12) |
Sep
(210) |
Oct
(99) |
Nov
(7) |
Dec
(30) |
2007 |
Jan
(161) |
Feb
(511) |
Mar
(265) |
Apr
(74) |
May
(147) |
Jun
(151) |
Jul
(94) |
Aug
(68) |
Sep
(98) |
Oct
(144) |
Nov
(26) |
Dec
(36) |
2008 |
Jan
(98) |
Feb
(107) |
Mar
(199) |
Apr
(113) |
May
(119) |
Jun
(112) |
Jul
(92) |
Aug
(71) |
Sep
(101) |
Oct
(16) |
Nov
|
Dec
|
From: Dana M. <dan...@us...> - 2004-08-25 21:03:55
|
Update of /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting/src/lib/cougaar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python/ruleEngine/acme_scripting/src/lib/cougaar Added Files: experiment.rb py_society_builder.rb scripting.rb society_builder.rb society_control.rb society_model.rb society_rule_engine.rb society_utils.rb Log Message: wholesale commit --- NEW FILE: society_control.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * </copyright> =end module Cougaar class NodeController def initialize(run, timeout, debug) @run = run @debug = debug @timeout = timeout @pids = {} @run['pids'] = @pids end def add_cougaar_event_params @xml_model = @run["loader"] == "XML" @node_type = "" @node_type = "xml_" if @xml_model @run.society.each_active_host do |host| host.each_node do |node| node.add_parameter("-Dorg.cougaar.event.host=127.0.0.1") node.add_parameter("-Dorg.cougaar.event.port=5300") node.add_parameter("-Dorg.cougaar.event.experiment=#{@run.comms.experiment_name}") end end end def start_all_nodes(action) nodes = [] @run.society.each_active_host do |host| host.each_node do |node| nameserver = false host.each_facet(:role) do |facet| nameserver = true if facet[:role].downcase=="nameserver" end if nameserver nodes.unshift node else nodes << node end end end msgs = {} nodes.each do |node| if @xml_model post_node_xml(node) msgs[node] = launch_xml_node(node) else msgs[node] = launch_db_node(node) end end nodes.each do |node| @run.info_message "Sending message to #{node.host.name} -- [command[start_#{@node_type}node]#{msgs[node]}] \n" if @debug result = @run.comms.new_message(node.host).set_body("command[start_#{@node_type}node]#{msgs[node]}").request(@timeout) if result.nil? @run.error_message "Could not start node #{node.name} on host #{node.host.host_name}" else @pids[node.name] = result.body node.active=true end end end def stop_all_nodes(action) nameserver_nodes = [] @run.society.each_host do |host| host.each_node do |node| nameserver = false host.each_facet(:role) do |facet| if facet[:role].downcase=="nameserver" nameserver_nodes << node nameserver = true end end stop_node(node) unless nameserver end end nameserver_nodes.each { |node| stop_node(node) } @pids.clear end def stop_node(node) host = node.host @run.info_message "Sending message to #{host.name} -- command[stop_#{@node_type}node]#{@pids[node.name]} \n" if @debug result = @run.comms.new_message(host).set_body("command[stop_#{@node_type}node]#{@pids[node.name]}").request(60) if result.nil? @run.info_message "Could not stop node #{node.name}(#{@pids[node.name]}) on host #{host.host_name}" else node.active=false end end def restart_node(action, node) if @xml_model msg_body = launch_xml_node(node, "xml") else msg_body = launch_db_node(node) end @run.info_message "RESTART: Sending message to #{node.host.name} -- [command[start_#{@node_type}node]#{msg_body}] \n" if @debug result = @run.comms.new_message(node.host).set_body("command[start_#{@node_type}node]#{msg_body}").request(@timeout) if result.nil? @run.error_message "Could not start node #{node.name} on host #{node.host.host_name}" else node.active = true @pids[node.name] = result.body end end def kill_node(action, node) pid = @pids[node.name] if pid @pids.delete(node.name) @run.info_message "KILL: Sending message to #{node.host.name} -- command[stop_#{@node_type}node]#{pid} \n" if @debug result = @run.comms.new_message(node.host).set_body("command[stop_#{@node_type}node]#{pid}").request(60) if result.nil? @run.error_message "Could not kill node #{node.name}(#{pid}) on host #{node.host.host_name}" else node.active = false node.agents.each do |agent| agent.set_killed end end else @run.error_message "Could not kill node #{node.name}...node does not have an active PID." end end def launch_db_node(node) return node.parameters.join("\n") end def launch_xml_node(node, kind='rb') return node.name+".#{kind}" end def post_node_xml(node) node_society = Cougaar::Model::Society.new( "society-for-#{node.name}" ) do |society| society.add_host( node.host.name ) do |host| host.add_node( node.clone(host) ) end end node_society.remove_all_facets result = Cougaar::Communications::HTTP.post("http://#{node.host.uri_name}:9444/xmlnode/#{node.name}.rb", node_society.to_ruby, "x-application/ruby") @run.info_message result if @debug end end module Actions class KeepSocietySynchronized < Cougaar::Action PRIOR_STATES = ["CommunicationsRunning"] RESULTANT_STATE = "SocietyRunning" DOCUMENTATION = Cougaar.document { @description = "Maintain a synchronization of Agents-Nodes-Hosts from Lifecycle CougaarEvents." @example = "do_action 'KeepSocietySynchronized'" } def perform @run.comms.on_cougaar_event do |event| if event.component=="SimpleAgent" || event.component=="ClusterImpl" || event.component=="Events" match = /.*AgentLifecycle\(([^\)]*)\) Agent\(([^\)]*)\) Node\(([^\)]*)\) Host\(([^\)]*)\)/.match(event.data) if match cycle, agent_name, node_name, host_name = match[1,4] if cycle == "Started" && @run.society.agents[agent_name] node = @run.society.agents[agent_name].node @run.society.agents[agent_name].set_running if node_name != node.name @run.society.agents[agent_name].move_to(node_name) @run.info_message "Moving agent: #{agent_name} to node: #{node_name}" # If the agent wasn't moved but actually restarted, # then it might still exist on the old Node. This blocks # quiescence and can use up memory. # Get it out of the quiescence-way - ubug 13539 # Note that this is not needed. The removing # of the agent below triggers a checkQuiescence itself # result = Cougaar::Communications::HTTP.get("#{node.uri}/agentQuiescenceState?dead=#{agent_name}", 60) # Remove it to free up resources - See ubug 13550 Thread.new(node.uri, node.name, agent_name) do |uri, node_name, agent| result = Cougaar::Communications::HTTP.get("#{uri}/move?op=Remove&mobileAgent=#{agent}&destNode=#{node_name}&action=Add", 60) end # FIXME: look at the result to see if this actually did something # If it did, log that fact # Note that you have to poll the /move servlet as it # works asynchronously. Get the UID out of the first # result (the one marked In Progress), and then look for # DOES_NOT_EXIST vs SUCCESSFUL or REMOVED later end end end end end end end class LogCougaarEvents < Cougaar::Action PRIOR_STATES = ["CommunicationsRunning"] DOCUMENTATION = Cougaar.document { @description = "Send all CougaarEvents to the run.log." @example = "do_action 'LogCougaarEvents'" } def perform @run.comms.on_cougaar_event do |event| ::Cougaar.logger.info event.to_s end end end class LoadComponent < Cougaar::Action PRIOR_STATES = ["SocietyRunning"] DOCUMENTATION = Cougaar.document { @description = "Adds or removes a component to/from an agent" @parameters = [ {:agentname=> "Name of the agent to add the component to"}, {:action=> "add or remove"}, {:component=>"the component"} ] @example = "do_action 'LoadComponent', '1-AD', 'add', 'org.cougaar.logistics.plugin.trans.RescindWatcher'" } def initialize(run, agentname, action, classname) super(run) @agentname = agentname @action = action @classname = classname end def perform @run.society.each_agent do |agent| if @agentname == agent.name then data, uri = Cougaar::Communications::HTTP.get("#{agent.uri}/load?op=#{@action}&insertionPoint=Node.AgentManager.Agent.PluginManager.Plugin&classname=#{@classname}", 60) end end end end class StartSociety < Cougaar::Action PRIOR_STATES = ["CommunicationsRunning"] RESULTANT_STATE = "SocietyRunning" DOCUMENTATION = Cougaar.document { @description = "Start a society from XML or CSmart." @parameters = [ {:timeout => "default=120, Number of seconds to wait to start each node before failing."}, {:debug => "default=false, If true, outputs messages sent to start nodes."} ] @example = "do_action 'StartSociety', 300, true" } def initialize(run, timeout=120, debug=false) super(run) unless timeout.kind_of?(Numeric) && (debug==true || debug==false) raise_failure "StartSociety usage: do_action 'StartSociety', timeout (default 120), debug (default false)" end @run['node_controller'] = ::Cougaar::NodeController.new(run, timeout, debug) end def perform time = Time.now.gmtime @run.society.each_node do |node| node.replace_parameter(/Dorg.cougaar.core.society.startTime/, "-Dorg.cougaar.core.society.startTime=\"#{time.strftime('%m/%d/%Y %H:%M:%S')}\"") end @run['node_controller'].add_cougaar_event_params @run['node_controller'].start_all_nodes(self) @run.add_to_interrupt_stack do do_action "StopSociety" end end end class StopSociety < Cougaar::Action PRIOR_STATES = ["SocietyRunning"] RESULTANT_STATE = "SocietyStopped" DOCUMENTATION = Cougaar.document { @description = "Stop a running society." @example = "do_action 'StopSociety'" } def perform @run['node_controller'].stop_all_nodes(self) end end class RestartNodes < Cougaar::Action PRIOR_STATES = ["SocietyRunning"] DOCUMENTATION = Cougaar.document { @description = "Restarts stopped node(s)." @parameters = [ :nodes => "*parameters, The list of nodes to restart" ] @example = "do_action 'RestartNodes', 'FWD-A', 'FWD-B'" } def initialize(run, *nodes) super(run) @nodes = nodes end def to_s return super.to_s+"(#{@nodes.join(', ')})" end def perform @nodes.each do |node| cougaar_node = @run.society.nodes[node] if cougaar_node @run['node_controller'].restart_node(self, cougaar_node) else @run.error_message "Cannot restart node #{node}, node unknown." end end end end class KillNodes < Cougaar::Action PRIOR_STATES = ["SocietyRunning"] DOCUMENTATION = Cougaar.document { @description = "Kills running node(s)." @parameters = [ :nodes => "*parameters, The list of nodes to kill" ] @example = "do_action 'KillNodes', 'FWD-A', 'FWD-B'" } def initialize(run, *nodes) super(run) @nodes = nodes end def to_s return super.to_s+"(#{@nodes.join(', ')})" end def perform @nodes.each do |node| cougaar_node = @run.society.nodes[node] if cougaar_node @run['node_controller'].kill_node(self, cougaar_node) else @run.error_message "Cannot kill node #{node}, node unknown." end end end end class MoveAgent < Cougaar::Action PRIOR_STATES = ["SocietyRunning"] DOCUMENTATION = Cougaar.document { @description = "Moves an Agent from its current node to the supplied node." @parameters = [ {:agent => "String, The name of the Agent to move."}, {:node => "String, The name of the Node to move the agent to."} ] @example = "do_action 'MoveAgent', '1-35-ARBN', 'FWD-B'" } def initialize(run, agent, node) super(run) @agent = agent @node = node end def perform # example format of move http request # http://sv116:8800/$1-35-ARBN/move?op=Move&mobileAgent=1-35-ARBN&originNode=&destNode=FWD-D&isForceRestart=false&action=Add # begin # First do a bunch of error checking if (@run.society.nodes[@node] == nil) @run.info_message "No node #{@node} to move #{@agent} to!" elsif (@run.society.agents[@agent] == nil) @run.info_message "No agent #{@agent} in society to move to #{@node}!" else # Could (should?) also check if the agent is already on the named node # Note we could ask the Node to move the agent, to avoid any timing issues. But that # seems to leave ugly WARNs and ERRORs in the logs that have no real harm # uri = "#{@run.society.agents[@agent].node.uri}/move?op=Move&mobileAgent=#{@agent}&originNode=&destNode=#{@node}&isForceRestart=false&action=Add" uri = "#{@run.society.agents[@agent].uri}/move?op=Move&mobileAgent=#{@agent}&originNode=&destNode=#{@node}&isForceRestart=false&action=Add" result = Cougaar::Communications::HTTP.get(uri) unless result @run.error_message "Error moving agent #{@agent} using uri #{uri}" return end end rescue @run.error_message "Could not move agent #{@agent} to #{@node} via HTTP\n#{$!.to_s}" return end end def to_s super.to_s+"('#{@agent}', '#{@node}')" end end end module States class SocietyLoaded < Cougaar::NOOPState DOCUMENTATION = Cougaar.document { @description = "Indicates that the society was loaded from XML, a Ruby script or a CSmart database." } end class SocietyRunning < Cougaar::NOOPState DOCUMENTATION = Cougaar.document { @description = "Indicates that the society started." } end class SocietyStopped < Cougaar::NOOPState DOCUMENTATION = Cougaar.document { @description = "Indicates that the society stopped." } end class RunStopped < Cougaar::State DEFAULT_TIMEOUT = 20.minutes PRIOR_STATES = ["SocietyStopped"] DOCUMENTATION = Cougaar.document { @description = "Indicates that the run was stopped." } def process while(true) return if @run.stopped? sleep 2 end @run.info_message "Run Stopped" end end end end --- NEW FILE: society_rule_engine.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * </copyright> =end module Cougaar module Actions class TransformSociety < Cougaar::Action PRIOR_STATES = ["SocietyLoaded"] DOCUMENTATION = Cougaar.document { @description = "Transforms the society with a list of rules." @parameters = [ {:verbose => "required, If true, displays the transformations performed. (true | false)"}, {:rules => "*rules, The rules to run. Can be file names or directory names."} ] @example = "do_action 'TransformSociety', true, 'config/rules/isat/tic_env.rule', 'config/rules/logistics'" } def initialize(run, verbose, *rules) super(run) raise "Must supply rules to transform society" if rules.size==0 @verbose = verbose @rules = rules end def perform @rules.each { |rule| @run.info_message "Applying #{rule}" } @engine = Cougaar::Model::RuleEngine.new(@run.society) @engine.load_rules(@rules.join(";")) @rules.each do |rulefile| if File.directory?(rulefile) Dir.glob(File.join(rulefile, "*.rule")).sort.each do |file| @run.archive_file(file, "Rule file used to transform the society") end else @run.archive_file(rulefile, "Rule file used to transform the society") end end @engine.enable_stdout if @verbose @engine.execute end end end end module Cougaar module Model class RuleEngine MAXLOOP = 300 attr_accessor :max_loop, :society, :abort_on_warning attr_reader :monitor def initialize(society, max_loop = MAXLOOP) @society = society @monitor = RuleMonitor.new(society) @max_loop = max_loop @rules = [] @stdout_enabled = false @abort_on_warning = false end def enable_stdout @stdout_enabled = true end def load_rules(list) list.split(";").each do |item| raise "Unknown file or directory: #{item}" unless File.exist?(item) if File.stat(item).directory? rules = Dir.glob(File.join(item, "*.rule")).sort else rules = [item] end rules.each do |rule_file| File.open(rule_file) do |file| rule = file.read begin @rules << Rule.new(rule_file, rule) rescue Exception => error output_warning "Error loading rule #{rule_file}: #{error}\n#{error.backtrace.join("\n")}" end end end end end def add_rule(name, proc = nil, &block) rule = Rule.new(name, proc, &block) @rules << rule rule end def execute $debug_society_model = true loop = true count = 0 while(loop && count < @max_loop) @monitor.clear @rules.each do |rule| @monitor.current_rule = rule puts "Executing rule: #{rule.name}." if @stdout_enabled rule.execute(self, @society) @monitor.report if @stdout_enabled @monitor.clear_counters if @stdout_enabled end loop = @monitor.modified? count += 1 end if count >= @max_loop output_warning "Detected endless loop in rule applciation." end if @stdout_enabled unused_rules = [] @rules.each do |rule| unused_rules << rule.name unless rule.modified_society? end if unused_rules.size > 0 output_warning "The rule(s)s: #{unused_rules.join(', ')} did not modify the society." end end @monitor.finish end def output_warning(message) message = "Rule Engine Warning: #{message}" if abort_on_warning raise "\n#{message}" else puts message end end end class Rule attr_accessor :name, :description, :fire_count, :modified_society attr_reader :society def initialize(name, proc=nil, &block) @name = name proc = block unless proc @rule = proc @modified_society = false end def modified_society? @modified_society end def execute(engine, society) @society = society begin if @rule.kind_of?(String) instance_eval(@rule) else @rule.call(self, society) end rescue Exception => error engine.output_warning "Error executing rule #{@name}: #{error}\n#{error.backtrace.join("\n")}" end end end class RuleMonitor < SocietyMonitor attr_accessor :current_rule def modified? return @modified end def clear @modified = false clear_counters end def clear_counters @hosts_added = @hosts_removed = 0 @nodes_added = @nodes_removed = 0 @agents_added = @agents_removed = 0 @components_added = @components_removed = 0 end def initialize(society) super() @society = society clear end def host_added(host) return unless host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @hosts_added += 1 end def host_removed(host) return unless host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @hosts_removed += 1 end def node_added(node) return unless node.host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @nodes_added += 1 end def node_removed(node) return unless node.host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @nodes_removed += 1 end def agent_added(agent) return unless agent.node.host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @agents_added += 1 end def agent_removed(agent) return unless agent.node.host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @agents_removed += 1 end def component_added(component) return unless component.agent.node.host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @components_added += 1 end def component_removed(component) return unless component.agent.node.host.society = @society @modified = true @current_rule.modified_society = true if @current_rule @components_removed += 1 end def report ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Added #{@hosts_added} hosts.")) if @hosts_added > 0 ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Removed #{@hosts_removed} hosts.")) if @hosts_removed > 0 ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Added #{@nodes_added} nodes.")) if @nodes_added > 0 ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Removed #{@nodes_removed} nodes.")) if @nodes_removed > 0 ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Added #{@agents_added} agents.")) if @agents_added > 0 ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Removed #{@agents_removed} agents.")) if @agents_removed > 0 ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Added #{@components_added} components.")) if @components_added > 0 ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Removed #{@components_removed} components.")) if @components_removed > 0 end end end end --- NEW FILE: society_model.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, [...1452 lines suppressed...] @society = society @query = block end ## # Calls the query with the supplied name: # query['name'] #=> value # # name:: [String] The name to pass to the block # return:: [Object] The query block's result # def [](name) @query.call(name) end end end # Model end # Cougaar --- NEW FILE: society_builder.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * </copyright> =end require 'rexml/document' require 'cougaar/experiment' require 'cougaar/society_model' module Cougaar class SocietyBuilder attr_reader :doc attr_accessor :filename def initialize(doc) @doc = doc end def self.from_xml_file(filename) file = File.new(filename) builder = SocietyBuilder.new(REXML::Document.new(file)) builder.filename = filename file.close() builder end def self.from_ruby_file(filename) builder = SocietyBuilder.new(filename) builder.filename = filename builder end def self.from_string(str) SocietyBuilder.new(REXML::Document.new(str)) end def to_xml_file(filename=nil) filename = @filename if filename.nil? File.open(filename, "wb") {|file| file.puts(self.society.to_xml)} end def to_ruby_file(filename=nil) filename = @filename if filename.nil? File.open(filename, "wb") {|file| file.puts(self.society.to_ruby)} end def to_s self.society.to_xml end def to_xml self.society.to_xml end def society return @society if @society if doc.kind_of? String load_ruby else parse_xml end @society end def load_ruby f = File.new(@doc) @society = eval f.read f.close() end def parse_xml @society = Model::Society.new(doc.root.attributes['name']) do |society| #add facets to host @doc.root.elements.each("facet") do |element| society.add_facet do |facet| element.attributes.each { |a, v| facet[a] = v } facet.cdata = element.text.strip if element.text end end @doc.elements.each("society/host") do |host_element| society.add_host(host_element.attributes['name']) do |host| #add facets to host host_element.elements.each("facet") do |element| host.add_facet do |facet| element.attributes.each { |a, v| facet[a] = v } facet.cdata = element.text.strip if element.text end end host_element.elements.each("node") do |node_element| host.add_node(node_element.attributes['name']) do |node| element = node_element.elements["class"] node.classname = element.text.strip if element #add attributes to node node_element.elements.each("facet") do |element| node.add_facet do |facet| element.attributes.each { |a, v| facet[a] = v } facet.cdata = element.text.strip if element.text end end #add parameters to node node_element.elements.each("vm_parameter") do |element| node.add_parameter(element.text.strip) end node_element.elements.each("env_parameter") do |element| node.add_env_parameter(element.text.strip) end node_element.elements.each("prog_parameter") do |element| node.add_prog_parameter(element.text.strip) end #add componenets to node node_element.elements.each("component") do |comp_element| node.agent.add_component(comp_element.attributes['name']) do |comp| comp.classname = comp_element.attributes['class'] comp.priority = comp_element.attributes['priority'] comp.insertionpoint = comp_element.attributes['insertionpoint'] comp_element.elements.each("order") do |arg_element| comp.order = arg_element.text.strip.to_i end #order_element #add arguments to component comp_element.elements.each("argument") do |arg_element| comp.add_argument(arg_element.text.strip) end #arg_element end #comp end #comp_element #add agents to node node_element.elements.each("agent") do |agent_element| node.add_agent(agent_element.attributes['name']) do |agent| agent.classname = agent_element.attributes['class'] #add attributes to agent agent_element.elements.each("facet") do |element| agent.add_facet do |facet| element.attributes.each { |a, v| facet[a] = v } facet.cdata = element.text.strip if element.text end end #add components to agent agent_element.elements.each("component") do |comp_element| agent.add_component(comp_element.attributes['name']) do |comp| comp.classname = comp_element.attributes['class'] comp.priority = comp_element.attributes['priority'] comp.insertionpoint = comp_element.attributes['insertionpoint'] comp_element.elements.each("order") do |arg_element| comp.order = arg_element.text.strip.to_i end #order_element #add arguments to component comp_element.elements.each("argument") do |arg_element| comp.add_argument(arg_element.text.strip) end end #comp end #comp_element end #agent end #agent_element end #node end #node_element end #host end #host_element end #society end #method parse end #class SocietyBuilder end #module Cougaar module Cougaar module Actions class LoadSocietyFromScript < Cougaar::Action RESULTANT_STATE = "SocietyLoaded" DOCUMENTATION = Cougaar.document { @description = "Load a society definition from a Ruby society file." @parameters = [ :filename => "required, The Ruby file name" ] @example = "do_action 'LoadSocietyFromScript', 'full-1ad.rb'" } def initialize(run, filename) super(run) @filename = filename end def perform raise_failure "Unknown Ruby file: #{@filename}" unless File.exist?(@filename) begin builder = Cougaar::SocietyBuilder.from_ruby_file(@filename) rescue raise_failure "Could not build society from Ruby file: #{@filename}", $! end @run.society = builder.society @run.archive_file(@filename, "Initial society file") @run["loader"] = "XML" end def to_s return super.to_s + "('#{@filename}')" end end class SaveCurrentSociety < Cougaar::Action PRIOR_STATES = ["SocietyLoaded"] DOCUMENTATION = Cougaar.document { @description = "Save the current (in memory) society to XML/Ruby." @parameters = [ :filename => "required, The XML/Ruby file name." ] @example = "do_action 'SaveCurrentSociety', 'full-1ad.xml'" } def initialize(run, filename) super(run) @filename = filename end def to_s return super.to_s+"('#{@filename}')" end def perform begin File.open(@filename, "w") do |file| if (File.basename(@filename)!=File.basename(@filename, ".xml")) file.puts @run.society.to_xml else file.puts @run.society.to_ruby end end @run.archive_and_remove_file(@filename, "Saved instance of society in memory") rescue @run.error_message "Could not write society to #{@filename}" end end end class LoadSocietyFromXML < Cougaar::Action RESULTANT_STATE = "SocietyLoaded" DOCUMENTATION = Cougaar.document { @description = "Load a society definition from an XML." @parameters = [ :filename => "required, The XML file name" ] @example = "do_action 'LoadSocietyFromXML', 'full-1ad.xml'" } def initialize(run, filename) super(run) @filename = filename end def perform raise_failure "Unknown XML file: #{@filename}" unless File.exist?(@filename) begin builder = Cougaar::SocietyBuilder.from_xml_file(@filename) rescue raise_failure "Could not build society from XML file: #{@filename}", $! end @run.society = builder.society @run.archive_file(@filename, "Initial society file") @run["loader"] = "XML" end def to_s return super.to_s + "('#{@filename}')" end end class LoadSocietyFromMemory < Cougaar::Action RESULTANT_STATE = "SocietyLoaded" DOCUMENTATION = Cougaar.document { @description = "Load a society stored in Cougaar.in_memory_society." @example = "do_action 'LoadSocietyFromMember'" } def initialize(run) super(run) end def perform raise_failure "In memory society not set" unless Cougaar.in_memory_society @run.society = Cougaar.in_memory_society @run["loader"] = "XML" end end end end --- NEW FILE: scripting.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * </copyright> =end require 'thread' $stdout.sync = true class Integer def seconds(value=0) return to_i+value end alias_method :second, :seconds def minutes(value=0) return to_i*60+value end alias_method :minute, :minutes def hours(value=0) return to_i*60*60+value end alias_method :hour, :hours def days(value=0) return to_i*24*60*60+value end alias_method :day, :days end module Cougaar class SimpleFileLogger LEVELS = ['disabled', 'error', 'info', 'debug'] def initialize(logName, logFile, logLevel) @logName = logName @logFile = logFile self.logLevel = logLevel @file = File.new(logFile, "a") @file.sync = true @mutex = Mutex.new end def logLevel=(logLevel) logLevel = LEVELS[logLevel] if logLevel.kind_of? Numeric @logLevel = logLevel.downcase case @logLevel when 'disabled' @logLevelInt = 0 when 'error' @logLevelInt = 1 when 'info' @logLevelInt = 2 when 'debug' @logLevelInt = 3 else raise "Unknown Logger level: #{@logLevel}" end end def close @file.close end def time Time.now.gmtime.to_s end def error(message) return if @logLevelInt < 1 write "[ERROR] #{time} :: #{message}" end def info(message) return if @logLevelInt < 2 write "[INFO] #{time} :: #{message}" end def debug(message) return if @logLevelInt < 3 write "[DEBUG] #{time} :: #{message}" end def write(line) @mutex.synchronize do @file.puts line end end end class Documentation attr_accessor :description, :example def initialize(&block) instance_eval(&block) cleanup end def cleanup if @description list = @description.split("\n") newlist = [] list.each { |v| newlist << v.strip } @description = newlist.join(" ") end if @example list = @example.split("\n") if list.size > 1 && list[0].strip=="" count = 0 list[1].each_byte do |byte| count+=1 if byte==32 break if byte != 32 end newlist = [] list[1..-1].each { |v| newlist << v[count..-1] } @example = newlist.join("\n") end end end def has_parameters? if @parameters return true else return false end end def has_block_yields? if @block_yields return true else return false end end def parameter_names result = [] if @parameters @parameters.each do |item| result << item.keys[0] end end return result end def block_yield_names result = [] if @block_yields @block_yields.each do |item| result << item.keys[0] end end return result end def each_block_yield if @block_yields @block_yields.each do |item| key = item.keys[0] yield key, item[key] end end end def each_parameter if @parameters @parameters.each do |item| key = item.keys[0] yield key, item[key] end end end end def self.document(&block) Cougaar::Documentation.new(&block) end def self.logger unless @logger File.delete('run.log') if File.exist?('run.log') @logger = SimpleFileLogger.new("ACME Run", "run.log", "info") end @logger end def self.debug? return self.constants.include?("DEBUG") && DEBUG end end require 'cougaar/society_model' #~ require 'cougaar/experiment' #~ require 'cougaar/society_utils' require 'cougaar/society_builder' #~ require 'cougaar/communications' #~ require 'cougaar/communities' #~ require 'cougaar/society_control' require 'cougaar/society_rule_engine' #~ require 'cougaar/persistence' #~ require 'cougaar/run_logging' --- NEW FILE: experiment.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, [...1534 lines suppressed...] EXPERIMENT_POST_DATA = <<-MULTIPART --BOUNDARY Content-Disposition: form-data; name="priority" PRIORITY --BOUNDARY Content-Disposition: form-data; name="definition_file"; filename="FILENAME" Content-Type: application/octet-stream EXPERIMENT --BOUNDARY Content-Disposition: form-data; name="definition_text" --BOUNDARY-- MULTIPART end end --- NEW FILE: society_utils.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * </copyright> =end require 'cougaar/experiment' module Cougaar module Actions class LayoutSociety < ::Cougaar::Action PRIOR_STATES = ["SocietyLoaded"] DOCUMENTATION = Cougaar.document { @description = "Layout a loaded society using the supplied layout and optional hosts file." @parameters = [ {:layout => "The layout file (valid society file in .xml or .rb)."}, {:hosts => "default=nil, If present, uses the hosts from this file instead of those in the layout file."} ] @example = "do_action 'LayoutSociety', '1ad-layout.xml', 'sa-hosts.xml'" } def initialize(run, layout, hosts=nil) super(run) @layout = layout @hosts = hosts @layout = ::Cougaar::Model::SocietyLayout.new @layout.layout_file = layout @layout.hosts_file = hosts @layout.load_files end def perform @run.info_message "Layout file #{@layout.layout_file}" @run.archive_file(@layout.layout_file, "Layout file for the society run") if @hosts @run.info_message "Hosts file #{@layout.hosts_file}" @run.archive_file(@layout.hosts_file, "Hosts file for the society run") else @run.info_message "No hosts file used for layout" end @layout.society = @run.society @layout.layout end end end module Model class SocietyComparison attr_accessor :society1, :society2, :differences def initialize(society1, society2) @society1 = society1 @society2 = society2 @differences = [] end class RemovalDifference def initialize(object) super(kind, object) @var = var @value1 = value1 @value2 = value2 end end class InstanceDifference def initialize(object, var, value1, value2) super(kind, object) @var = var @value1 = value1 @value2 = value2 end end def instance_diff(object, var, value1, value2) @differences << InstanceDifference.new(object, var, value1, value2) end def component_removed(list) @differences << Instance end def diff diff_hosts diff_nodes diff_agents return self end private def diff_hosts society1_hosts = [] society1.each_host {|host| society1_hosts << host.name} society2_hosts = [] society2.each_host {|host| society2_hosts << host.name} removed_hosts = society1_hosts - society2_hosts added_hosts = society2_hosts - society1_hosts end def diff_nodes society1_nodes = [] society1.each_node {|node| society1_nodes << node.name} society2_nodes = [] society2.each_node {|node| society2_nodes << node.name} removed_nodes = society1_nodes - society2_nodes added_nodes = society2_nodes - society1_nodes end def diff_agents society1_agents = [] society1.each_agent {|agent| society1_agents << agent.name} society2_agents = [] society2.each_agent {|agent| society2_agents << agent.name} removed_agents = society1_agents - society2_agents added_agents = society2_agents - society1_agents end end class SocietyLayout attr_accessor :society_file, :layout_file, :hosts_file, :society def self.from_files(society_file, layout_file, hosts_file = nil) layout = SocietyLayout.new layout.society_file = society_file layout.layout_file = layout_file layout.hosts_file = hosts_file layout.load_files return layout end def self.from_society(society, layout_file, hosts_file = nil) layout = SocietyLayout.new layout.society = society layout.layout_file = layout_file layout.hosts_file = hosts_file layout.load_files return layout end def load_files @society = load_file(@society_file) if @society_file @society_layout = load_file(@layout_file) if @layout_file @society_hosts = load_file(@hosts_file) if @hosts_file end def layout # build temporary host and node and move all agents to it guid = Time.now.to_i @society.add_host("host-#{guid}") { |host| host.add_node("node-#{guid}") } agentlist = [] @society.each_agent { |agent| agentlist << agent } agentlist.each {|agent| agent.move_to("node-#{guid}")} # remove all existing hosts/nodes purgelist = [] @society.each_host { |host| purgelist << host unless host.name=="host-#{guid}" } purgelist.each { |host| society.remove_host(host) } # build a list of available hosts hostlist = nil hostgroups = nil unused_hostlist = nil if @society_hosts hostgroups = {} unused_hostlist = [] @society_hosts.each_host do |host| target = false host.each_facet(:service) do |facet| target = true if facet[:service].downcase=='acme' end if target group = host.get_facet(:group) if group list = hostgroups[group] list ||= [] list << host hostgroups[group]=list else list = hostgroups[:ungrouped] list ||= [] list << host hostgroups[:ungrouped] = list end else unused_hostlist << host end end end # copy layout and host society's facets to the society... @society_layout.each_facet { |facet| @society.add_facet(facet.clone) } @society_hosts.each_facet { |facet| @society.add_facet(facet.clone) } if @society_hosts # perform layout @society_layout.each_host do |host| if @society_hosts if host.has_facet?(:group) target_host = hostgroups[host.get_facet(:group)].shift #puts "Group #{host.get_facet(:group)} has #{hostgroups[host.get_facet(:group)].size} hosts left" unless target_host raise "Not enough hosts in #{@host_file} for group #{host.get_facet(:group)} in the society layout file #{@layout_file}" end else target_host = hostgroups[:ungrouped].shift #puts "Group ungrouped has #{hostgroups[:ungrouped].size} hosts left" unless target_host raise "Not enough hosts in #{@host_file} for ungrouped in the society layout file #{@layout_file}" end end else target_host = host end @society.add_host(target_host.name) do |newhost| host.each_facet { |facet| newhost.add_facet(facet.clone) } if target_host!=host target_host.each_facet { |facet| newhost.add_facet(facet.clone) } end host.each_node do |node| newhost.add_node(node.name) do |newnode| node.each_facet { |facet| newnode.add_facet(facet.clone) } end node.each_agent do |agent| to_move = @society.agents[agent.name] if to_move to_move.move_to(node.name) # add layout society's agent facets to the agent agent.each_facet {|facet| to_move.add_facet(facet.clone)} else ExperimentMonitor.notify(ExperimentMonitor::InfoNotification.new("Layout specifies agent '#{agent.name}' that is not defined in the society")) end end end end end if unused_hostlist unused_hostlist.each do |host| @society.add_host(host.name) do |newhost| host.each_facet { |facet| newhost.add_facet(facet.clone) } end end end # check to make sure we laid out all the agents agentlist = [] @society.nodes["node-#{guid}"].each_agent { |agent| agentlist << agent } if agentlist.size>0 names = agentlist.collect { |agent| agent.name } raise "Did not layout the agents: #{ names.join(', ') }" end @society.remove_host("host-#{guid}") end def to_ruby_file(filename) f = File.open(filename, "w") f.puts(@society.to_ruby) f.close end def to_xml_file(filename) f = File.open(filename, "w") f.puts(@society.to_xml) f.close end def tree @society.each_host do |host| puts host.name host.each_node do |node| puts " "+node.name node.each_agent do |agent| puts " "+agent.name end end end end def load_file(file) if file[-3..-1] == '.rb' return Cougaar::SocietyBuilder.from_ruby_file(file).society else return Cougaar::SocietyBuilder.from_xml_file(file).society end end end ## # The SocietyMonitor collects chagnes to the cougaar society and # reports them to instances. # # class SocietyMonitor @@monitors = [] def self.add(monitor) @@monitors << monitor end def self.remove(monitor) @@monitors.delete(monitor) end def self.each_monitor @@monitors.each {|monitor| yield monitor} end def finish SocietyMonitor.remove(self) end def initialize SocietyMonitor.add(self) end def host_added(host) ; end def host_removed(host) ; end def node_added(node) ; end def node_removed(node) ; end def agent_added(agent) ; end def agent_removed(agent) ; end def component_added(component) ; end def component_removed(component) ; end def self.enable_stdout m = SocietyMonitor.new def m.host_added(host) puts "Host added #{host.host_name} < #{host.society.name}" end def m.host_removed(host) puts "Host removed #{host.host_name} < #{host.society.name}" end def m.node_added(node) puts "Node added #{node.name} < #{node.host.host_name} < #{node.host.society.name}" end def m.node_removed(node) puts "Node removed #{node.name} < #{node.host.host_name} < #{node.host.society.name}" end def m.agent_added(agent) puts "Agent added #{agent.name} < #{agent.node.name} < #{agent.node.host.host_name} < #{agent.node.host.society.name}" end def m.agent_removed(agent) puts "Agent removed #{agent.name} < #{agnet.node.name} on #{agent.node.host.host_name} < #{agent.node.host.society.name}" end def m.component_added(component) puts "Component added #{component.name} < #{component.agent.name} < #{component.agent.node.name} < #{component.agent.node.host.host_name} < #{component.agent.node.host.society.name}" end def m.agent_removed(agent) puts "Component removed #{component.name} < #{component.agent.name} < #{component.agent.node.name} < #{component.agent.node.host.host_name} < #{component.agent.node.host.society.name}" end end end end end --- NEW FILE: py_society_builder.rb --- =begin * <copyright> * Copyright 2001-2004 InfoEther LLC * Copyright 2001-2004 BBN Technologies * * under sponsorship of the Defense Advanced Research Projects * Agency (DARPA). * * You can redistribute this software and/or modify it under the * terms of the Cougaar Open Source License as published on the * Cougaar Open Source Website (www.cougaar.org <www.cougaar.org> ). * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * </copyright> =end # py_society_builder.rb # Builds a society object from a string of Ruby code arriving # via stdin, transforms it according to rules passed in as args, # then outputs the new society to stdout as a string of xml. #~ $:.unshift ".." #~ $:.unshift "../../../../acme_service/src/redist" $:.unshift "ruleEngine/acme_scripting/src/lib" $:.unshift "ruleEngine/acme_service/src/redist" require 'cougaar/scripting' require 'cougaar/society_rule_engine' society = eval $stdin.read engine = Cougaar::Model::RuleEngine.new(society) engine.load_rules(ARGV.join(";")) #engine.enable_stdout if @verbose engine.execute puts society.to_xml |
From: Dana M. <dan...@us...> - 2004-08-25 21:03:54
|
Update of /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python/ruleEngine/acme_scripting Added Files: README Log Message: wholesale commit --- NEW FILE: README --- This represents the first release of the ACME Scripting library. This library must be installed on all computers that will control Cougaar societies via ACME. Linux Requirments: Ruby 1.6.8 ( see http://www.ruby-lang.org ) MySQL Ruby extension ( see http://www.tmtm.org/en/mysql/ruby ) Windows Requirements: Ruby 1.6.8 Installer ( see http://rubyinstaller.sourceforge.net ) Installation: To install this library change to the bin directory and run the install script- cd bin ruby install.rb Important Note: This library does not have to be installed to be used. If you have a directory where you unpack the ACME overlay it creates a subdirectory 'csmart' which holds the 'acme_scripting' directory. In that top level directory, if you created a Ruby script that you wanted to reference these files from, you simply need to include the directory path in your Ruby library path: script.rb $:.unshift 'csmart/acme_scripting/src/lib' $:.unshift 'csmart/acme_service/src/redist' require 'cougaar/scripting' require 'ultralog/scripting' ... Files: bin/install.rb - Install the ACME Scripting library in the site_ruby directory bin/acme_doc.rb - Generate text documentation for States and Actions bin/html_doc.rb - Generate html documentation for States and Actions bin/DOC_README - Usage instructions for acme_doc and html_doc. bin/install_lib - Install redistributed libraries in site_ruby directory regress/tutorial - Tutorial files src/lib/cougaar - Cougaar general scripting files src/lib/ultralog - Ultralog-specific scripting files src/lib/polaris - Polaris continuous-testing scripting files |
Update of /cvsroot/pydev/awb/src/Python/bmp_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python/bmp_source Added Files: 001.png 002.png 003.png 004.png 005.png 006.png 007.png 008.png 009.png 010.png 011.png 012.png 013.png 014.png 015.png 016.png 017.png 018.png 019.png 020.png 021.png 022.png 023.png 024.png 025.png 026.png 027.png 028.png 029.png 030.png GridBG.gif Thumbs.db agent.bmp backgrnd.png component.bmp gizmoStatic.png host.bmp mondrian.ico node.bmp noicon.png querymark.bmp rest.png society.bmp Log Message: wholesale commit --- NEW FILE: rest.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 009.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 021.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gizmoStatic.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 026.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 004.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 016.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 014.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: backgrnd.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 028.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 029.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: host.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 027.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Thumbs.db --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 024.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 012.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 011.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 010.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 030.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 015.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: component.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: agent.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 019.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 018.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 020.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 013.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 017.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 005.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 007.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 008.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: querymark.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: node.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mondrian.ico --- (This appears to be a binary file; contents omitted.) --- NEW FILE: society.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: GridBG.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 025.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 001.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 002.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 003.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 006.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: noicon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 022.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 023.png --- (This appears to be a binary file; contents omitted.) |
From: Dana M. <dan...@us...> - 2004-08-25 21:03:53
|
Update of /cvsroot/pydev/awb/src/Python/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python/data Added Files: resource.wdr resource_wdr.xrc showTips tips.txt Log Message: wholesale commit --- NEW FILE: resource.wdr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tips.txt --- Each of the tabs in the CSMARTer window is a separate application. Build or apply a rule using the Rule Editor. Edit an existing society using the Society Editor. Allocate agents to hosts using the Agent Laydown tool. When allocating agents to hosts, you can do so either by distributing agents evenly among the available hosts, or you can specify the number of agents to be placed on each host. When you place agents on a host automatically (i.e., using the Distribute Agents button in the Agent Laydown tool), nodes are automatically created on each host. When allocating agents to hosts in the Agent Laydown tool, you can drag and drop agents and nodes between the windows and within a single window. When dragging and dropping agents or nodes in the Agent Laydown tool, you can drag one or several items, but you cannot drag different type items; e.g., you cannot drag a node and only some of its agents, you must take only the agents or the node and all of its agents (by just taking the node, you'll get all the agents as well). Forward suggestions to pga...@bb... or da...@bb... --- NEW FILE: showTips --- (0, 4) --- NEW FILE: resource_wdr.xrc --- <?xml version="1.0"?> <!-- XML resource generated by wxDesigner from file: resource.wdr --> <!-- Do not modify this file, all changes will be lost! --> <resource> <object class="wxPanel" name="MyPanel"> <object class="wxFlexGridSizer"> <cols>2</cols> <rows>0</rows> <vgap>0</vgap> <hgap>0</hgap> <object class="sizeritem"> <flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxStaticText" name="ID_TEXT"> <label>Name:</label> </object> </object> <object class="sizeritem"> <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_NameField"> <size>80,-1</size> <value></value> </object> </object> <object class="sizeritem"> <flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxStaticText" name="ID_TEXT"> <label>Address:</label> </object> </object> <object class="sizeritem"> <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_Addr1Field"> <size>80,-1</size> <value></value> </object> </object> <object class="spacer"> <flag>wxALIGN_CENTRE</flag> <border>5</border> <size>20,20</size> </object> <object class="sizeritem"> <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_TEXTCTRL"> <size>80,-1</size> <value></value> </object> </object> <object class="sizeritem"> <flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxStaticText" name="ID_TEXT"> <label>City, State, Zip:</label> </object> </object> <object class="sizeritem"> <flag>wxGROW|wxALIGN_CENTER_VERTICAL</flag> <border>5</border> <object class="wxBoxSizer"> <orient>wxHORIZONTAL</orient> <object class="sizeritem"> <flag>wxALIGN_CENTRE|wxLEFT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_CityField"> <size>100,-1</size> <value></value> </object> </object> <object class="sizeritem"> <flag>wxALIGN_CENTRE|wxLEFT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_StateField"> <size>30,-1</size> <value></value> </object> </object> <object class="sizeritem"> <flag>wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_ZipField"> <size>50,-1</size> <value></value> </object> </object> </object> </object> <object class="sizeritem"> <flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL</flag> <border>5</border> <object class="wxStaticText" name="ID_TEXT"> <label>Phone:</label> </object> </object> <object class="sizeritem"> <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_PhoneField"> <size>80,-1</size> <value></value> </object> </object> <object class="sizeritem"> <flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL</flag> <border>5</border> <object class="wxStaticText" name="ID_TEXT"> <label>Email:</label> </object> </object> <object class="sizeritem"> <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP</flag> <border>5</border> <object class="wxTextCtrl" name="ID_EmailField"> <size>80,-1</size> <value></value> </object> </object> <object class="spacer"> <flag>wxALIGN_CENTRE|wxALL</flag> <border>5</border> <size>20,20</size> </object> <object class="sizeritem"> <flag>wxGROW|wxALIGN_CENTER_VERTICAL</flag> <border>5</border> <object class="wxBoxSizer"> <orient>wxHORIZONTAL</orient> <object class="sizeritem"> <flag>wxALIGN_CENTRE|wxALL</flag> <border>5</border> <object class="wxButton" name="wxID_OK"> <label>Save</label> </object> </object> <object class="sizeritem"> <flag>wxALIGN_CENTRE|wxALL</flag> <border>5</border> <object class="wxButton" name="wxID_CANCEL"> <label>Cancel</label> </object> </object> </object> </object> </object> </object> </resource> |
From: Dana M. <dan...@us...> - 2004-08-25 21:03:39
|
Update of /cvsroot/pydev/awb/src/Python/bitmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python/bitmaps Added Files: ACME2003.gif Copy of ACME2003.gif Thumbs.db Tux.png agent.bmp component.bmp csmarter.ico csmarterIcon.bmp earth.gif host.bmp node.bmp querymark.bmp society.bmp Log Message: wholesale commit --- NEW FILE: node.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: host.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: csmarter.ico --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Thumbs.db --- (This appears to be a binary file; contents omitted.) --- NEW FILE: society.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: component.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Copy of ACME2003.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: querymark.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Tux.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ACME2003.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: earth.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: agent.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: csmarterIcon.bmp --- (This appears to be a binary file; contents omitted.) |
From: Dana M. <dan...@us...> - 2004-08-25 21:03:38
|
Update of /cvsroot/pydev/awb/src/Python/Sample-Rules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python/Sample-Rules Added Files: Override.rul args.rul rule1.rul ruleblaah.rul Log Message: wholesale commit --- NEW FILE: args.rul --- # Dana - Add Argument for component in society.each_component(): if str(component.klass) == "org.cougaar.foo.foo": hasArg = False for argument in component.arguments: if argument.name == "Parameter2": hasArg = True if hasArg is False: component.add_argument(Argument("Parameter2", rule=self.name)) self.fire() --- NEW FILE: rule1.rul --- description: Dana - Add blah blah to all agents rule: for agent in society.each_agent(): hascomp = False for component in agent.components: if str(component.klass) == "org.cougaar.foo.foo": hascomp = True if hascomp is not True: name = str(agent.name)+"|org.cougaar.foo.foo" c = Component(name, klass="org.cougaar.foo.foo", priority = "COMPONENT", insertionpoint="Node.AgentManager.Agent.PluginManager.Plugin", rule=self.name) agent.add_component(c) c.add_argument(Argument("Parameter1", rule=self.name)) self.fire() --- NEW FILE: ruleblaah.rul --- description: Add blah blah to all agents rule: for agent in society.each_agent(): hascomp = False for component in agent.components: if str(component.klass) == "org.cougaar.foo.foo": hascomp = True if hascomp is not True: name = str(agent.name)+"|org.cougaar.foo.foo" c = Component(name, "org.cougaar.foo.foo", "COMPONENT", "Node.AgentManager.Agent.PluginManager.Plugin") agent.add_component(c) c.add_argument(Argument("Parameter1")) self.fire() # uber-important to add this !!! --- NEW FILE: Override.rul --- description: Dana - Override All Components rule: for host in society.each_host(): for node in host.each_node(): self.fire() node.remove_parameter(VMParameter("-Dorg.cougaar.control.port")) node.override_parameter("-Dorg.cougaar.node.InitializationComponent","XML") node.set_rule(self.name) for agent in node.each_agent(): agent.remove_component("org.cougaar.core.topology.TopologyReaderServlet") agent.set_rule(self.name) for comp in agent.each_component(): if (comp.klass == "org.cougaar.mlm.plugin.ldm.LDMSQLPlugin"): comp.arguments[0].value = "fdm_equip_ref.q" comp.set_rule(self.name) if (comp.klass == "org.cougaar.mlm.plugin.organization.GLSInitServlet"): comp.arguments[0].value = "093FF.oplan.noncsmart.q" comp.set_rule(self.name) |
Update of /cvsroot/pydev/awb/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python Added Files: .cvsignore AWB.bat AWB.log AWB.py AWBcontroller.bat About.py AgentDataCollector.py ArtHNA.xml CS03.py CSMARTer.bat CSMARTer.log Cecom.bat __init__.py agentCanvas.py agentCanvas.pyc agentController.py agentController.pyc agentLaydown.py agentLaydown.pyc agentsRoot.html awb.list.p cecomDLG.py cougaar_DragAndDrop.py cougaar_DragAndDrop.pyc csmarter_events.py csmarter_events.pyc debug.py editorTextControl.py editorTextControl.pyc encode_bitmaps.py eventFactory.py eventFactory.pyc facetProperties.py facetProperties.pyc gizmo.py gizmo.pyc gizmoImages.py gizmoImages.pyc globalConstants.py globalConstants.pyc hierarchy-small.xml hierarchy.xml images.py images.pyc informationPanel.py informationPanel.pyc insertion_dialog.py insertion_dialog.pyc mySociety.py probeDLG.py probeDLG.pyc run.py run.pyc screenScraper.py screenScraper.pyc screenScraperTest.py servletProperties.py servletProperties.pyc simple.rb simpleCanvas.py societyBuilder.py societyBuilder.pyc societyController.py societyController.pyc societyEditor.py societyEditor.pyc societyFactoryServer.py societyFactoryServer.pyc societyReader.py societyReader.pyc societyViewer.py societyViewer.pyc societyVisualModel.py societyVisualModel.pyc urlDlg.py urlDlg.pyc zoomer.py zoomer.pyc Log Message: wholesale commit --- NEW FILE: societyController.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: societyFactoryServer.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: urlDlg.py --- import sys import re import os from wxPython.wx import * from wxPython.help import * import images import pickle #--------------------------------------------------------------------------- URLSEQ = ['LEADER', 'HOST', 'COLON_SEP','PORT','HACK','DOLLAR','AGENT', 'REMAINDER'] URLITEMS = {'LEADER':'http://', 'HOST': None, 'COLON_SEP':':', 'PORT': None, 'HACK':'/', 'DOLLAR':'$', 'AGENT':None, 'REMAINDER':'/hierarchy?recurse=true&allRelationships=true&format=xml&Display=', } HOST_COMBOBOX_ID = 601 PORT_COMBOBOX_ID = 602 AGENT_COMBOBOX_ID = 603 URL_COMBOBOX_ID = 604 OBJECT_STORE = 'awb.list.p' class URLDlg(wxDialog): def OnSetFocus(self, evt): print "OnSetFocus" evt.Skip() def OnKillFocus(self, evt): print "OnKillFocus" evt.Skip() def GetBookmarkedData(self): try: self.URLcomponents = pickle.load(open(OBJECT_STORE)) print self.URLcomponents except IOError, why: self.log.WriteText("IO Error %s" % why) self.URLcomponents = URLcomponents() def __init__(self, parent, ID, log, title, pos=wxDefaultPosition, size=wxDefaultSize, style=wxDEFAULT_DIALOG_STYLE): pre = wxPreDialog() pre.Create(parent, ID, title, pos, size, style) self.this = pre.this self.parent = parent self.initParticles() self.log = log self.URLcomponents = URLcomponents() self.GetBookmarkedData() #~ ------------------------------ urlLbl = wxStaticText(self, -1, "Host") default = "enter/select host" if len(self.URLcomponents.hosts) > 0 : default = self.URLcomponents.hosts[0] URLITEMS['HOST'] = default self.cbHosts = wxComboBox(self, HOST_COMBOBOX_ID, default, wxPoint(-1,-1), wxSize(90, -1), # wxPoint(90, 50), wxSize(95, -1), self.URLcomponents.hosts, wxCB_DROPDOWN) EVT_TEXT(self, self.cbHosts.GetId(), self.EvtText) EVT_TEXT_ENTER(self, self.cbHosts.GetId(), self.EvtTextEnter) #~ EVT_CHAR(t1, self.EvtChar) #~ ------------------------------ portLbl = wxStaticText(self, -1, "Port") default = "enter/select port" if len(self.URLcomponents.ports) > 0 : default = self.URLcomponents.ports[0] URLITEMS['PORT'] = default self.cbPorts = wxComboBox(self, PORT_COMBOBOX_ID, default, wxPoint(-1,-1), wxSize(90, -1), # wxPoint(90, 50), wxSize(95, -1), self.URLcomponents.ports, wxCB_DROPDOWN) EVT_TEXT(self, self.cbPorts.GetId(), self.EvtText) EVT_TEXT_ENTER(self, self.cbPorts.GetId(), self.EvtTextEnter) #~ ------------------------------ agentLbl = wxStaticText(self, -1, "Agent") default = "enter/select agent" if len(self.URLcomponents.agents) > 0 : default = self.URLcomponents.agents[0] URLITEMS['AGENT'] = default self.cbAgents = wxComboBox(self, AGENT_COMBOBOX_ID, default, wxPoint(-1,-1), wxSize(90, -1), # wxPoint(90, 50), wxSize(95, -1), self.URLcomponents.agents, wxCB_DROPDOWN) EVT_TEXT(self, self.cbAgents .GetId(), self.EvtText) EVT_TEXT_ENTER(self, self.cbAgents .GetId(), self.EvtTextEnter) #~ ------------------------------ cbLbl = wxStaticText(self, -1, "UL Heirarchy Servlet", wxPoint(8, 10)) default = "" if len(self.URLcomponents.urls) is 0: default = "No URLs Bookmarked" else: default = self.urlcomponents.urls[0] cb = wxComboBox(self, URL_COMBOBOX_ID , default, wxPoint(10, 50), wxSize(300, -1), self.URLcomponents.urls, wxCB_DROPDOWN) EVT_COMBOBOX(self,URL_COMBOBOX_ID , self.EvtComboBox) EVT_TEXT(self, URL_COMBOBOX_ID , self.EvtText) EVT_TEXT_ENTER(self, URL_COMBOBOX_ID , self.EvtTextEnter) EVT_SET_FOCUS(cb, self.OnSetFocus) EVT_KILL_FOCUS(cb, self.OnKillFocus) #~ ------------------------------ self.bg_bmp = images.getGridBGBitmap() EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) bOk = wxButton(self, wxID_OK, "OK") bOk.SetDefault() EVT_BUTTON(self, bOk.GetId(), self.OnOk) bCan = wxButton(self, wxID_CANCEL, "Cancel") EVT_BUTTON(self, bCan.GetId(), self.OnCancel) bsizer = wxBoxSizer(wxHORIZONTAL) bsizer.Add(bOk, 0, wxGROW|wxALL, 4) bsizer.Add(bCan, 0, wxGROW|wxALL, 4) sizer = wxFlexGridSizer(cols=3, hgap=6, vgap=6) sizer.AddMany([urlLbl, self.cbHosts, (0,0), portLbl, self.cbPorts, (0,0), agentLbl, self.cbAgents, (0,0), cbLbl, cb, (0,0), (0,0),bsizer,(0,0), ]) border = wxBoxSizer(wxVERTICAL) border.Add(sizer, 0, wxALL, 25) self.SetSizer(border) self.SetAutoLayout(True) # ---------------------------------------------- def initParticles(self): self.url = "" self.port = "" self.agent = "" def OnOk(self, evt): rtn = self.formURLStrings() if rtn is True: self.SetReturnCode(wxID_OK) self.Destroy() def OnCancel(self, evt): self.SetReturnCode(wxID_CANCEL) self.Destroy() def OnEraseBackground(self, evt): dc = evt.GetDC() if not dc: dc = wxClientDC(self.GetClientWindow()) # tile the background bitmap sz = self.GetClientSize() w = self.bg_bmp.GetWidth() h = self.bg_bmp.GetHeight() x = 0 while x < sz.width: y = 0 while y < sz.height: dc.DrawBitmap(self.bg_bmp, x, y) y = y + h x = x + w def EvtComboBox(self, evt): cb = evt.GetEventObject() #~ data = cb.GetClientData(cb.GetSelection()) #~ self.log.WriteText('EvtComboBox: %s\nClientData: %s\n' % (evt.GetString(), data)) def EvtText(self, evt): #~ self.log.WriteText('EvtText: %s\n' % evt.GetString()) if evt.GetId() == HOST_COMBOBOX_ID:URLITEMS['HOST'] = evt.GetString() if evt.GetId() == PORT_COMBOBOX_ID:URLITEMS['PORT'] = evt.GetString() if evt.GetId() == AGENT_COMBOBOX_ID:URLITEMS['AGENT'] = evt.GetString() def EvtTextEnter(self, evt): self.log.WriteText('EvtTextEnter: %s, %s, %s\n' % (evt.GetString(), evt.GetEventObject(), evt.GetId())) obj = evt.GetEventObject() self.log.WriteText("EvtTextEnter:%s\n %s, %s" % (dir(obj),obj.GetLabel(), obj.GetName())) def EvtChar(self, event): self.log.WriteText('EvtChar: %d\n' % event.GetKeyCode()) event.Skip() def formURLStrings(self): done = True for i in URLSEQ: if URLITEMS[i] is None or URLITEMS[i] is "": dlg = wxMessageDialog(self.parent, 'Need a value for '+str(i), 'No!', wxOK | wxICON_INFORMATION) #wxYES_NO | wxNO_DEFAULT | wxCANCEL | wxICON_INFORMATION) dlg.ShowModal() done = False if done: s = "" for i in URLSEQ: s += URLITEMS[i] self.log.WriteText("formURLStrings:%s" % (s)) if URLITEMS['HOST'] not in self.URLcomponents.hosts: self.URLcomponents.hosts.append( str(URLITEMS['HOST']) ) if URLITEMS['PORT'] not in self.URLcomponents.ports: self.URLcomponents.ports.append( str(URLITEMS['PORT']) ) if URLITEMS['AGENT'] not in self.URLcomponents.agents: self.URLcomponents.agents.append( str(URLITEMS['AGENT']) ) pickle.dump(self.URLcomponents,open(OBJECT_STORE,'w')) self.parent.URL = s return done class URLcomponents: def __init__(self): self.hosts = [] self.ports = [] self.agents = [] self.urls = [] def __str__(self): s0 = "URL COMPONENTS\n" s1 = "Hosts\n" for i in self.hosts: s1 += str(i)+"\n" s1 += '\n' s2 = "Ports\n" for i in self.ports: s2 += str(i)+"\n" s2 += '\n' s3 = "Agents\n" for i in self.agents: s3 += str(i)+"\n" s3 += '\n' return s0+s1 + s2 + s3 #--------------------------------------------------------------------------- def runTest(frame, nb, log): win = URLDlg(nb, log) return win if __name__ == '__main__': import sys,os import run run.main(['', os.path.basename(sys.argv[0])]) --- NEW FILE: gizmo.py --- import threading, os ##os.putenv('LANG', 'C') # for running on GTK2 from wxPython.wx import * # ------------------------------------------------------------------------------ wxEVT_UPDATE_GIZMO = wxNewEventType() def EVT_UPDATE_GIZMO(win, func): win.Connect(-1, -1, wxEVT_UPDATE_GIZMO, func) class UpdateGizmoEvent(wxPyEvent): def __init__(self): wxPyEvent.__init__(self) self.SetEventType(wxEVT_UPDATE_GIZMO) # ------------------------------------------------------------------------------ class Gizmo(wxPanel): """ The first argument is either the name of a file that will be split into frames (a composite image) or a list of strings of image names that will be treated as individual frames. If a single (composite) image is given, then additional information must be provided: the number of frames in the image and the width of each frame. The first frame is treated as the "at rest" frame (it is not shown during animation, but only when GIZMO.Rest() is called. A second, single image may be optionally specified to overlay on top of the animation. A label may also be specified to show on top of the animation. """ def __init__(self, parent, id, bitmap, # single (composite) bitmap or list of bitmaps pos = (554,316), #wxDefaultPosition, size = wxDefaultSize, frameDelay = 0.1,# time between frames frames = 0, # number of frames (only necessary for composite image) frameWidth = 0, # width of each frame (only necessary for composite image) label = None, # optional text to be displayed overlay = None, # optional image to overlay on animation reverse = 0, # reverse direction at end of animation style = 0, # window style name = "gizmo"): wxPanel.__init__(self, parent, id, pos, size, style, name) self.name = name self.label = label _seqTypes = (type([]), type(())) # set size, guessing if necessary width, height = size if width == -1: if type(bitmap) in _seqTypes: width = bitmap[0].GetWidth() else: if frameWidth: width = frameWidth if height == -1: if type(bitmap) in _seqTypes: height = bitmap[0].GetHeight() else: height = bitmap.GetHeight() self.width, self.height = width, height # double check it assert width != -1 and height != -1, "Unable to guess size" if label: extentX, extentY = self.GetTextExtent(label) self.labelX = (width - extentX)/2 self.labelY = (height - extentY)/2 self.frameDelay = frameDelay self.current = 0 self.direction = 1 self.autoReverse = reverse self.overlay = overlay if overlay is not None: self.overlay = overlay self.overlayX = (width - self.overlay.GetWidth()) / 2 self.overlayY = (height - self.overlay.GetHeight()) / 2 self.showOverlay = overlay is not None self.showLabel = label is not None # do we have a sequence of images? if type(bitmap) in _seqTypes: self.submaps = bitmap self.frames = len(self.submaps) # or a composite image that needs to be split? else: self.frames = frames self.submaps = [] for chunk in range(frames): rect = (chunk * frameWidth, 0, width, height) self.submaps.append(bitmap.GetSubBitmap(rect)) # self.sequence can be changed, but it's not recommended doing it # while the gizmo is running. self.sequence[0] should always # refer to whatever frame is to be shown when 'resting' and be sure # that no item in self.sequence >= self.frames or < 0!!! self.sequence = range(self.frames) self.SetClientSize((width, height)) EVT_PAINT(self, self.OnPaint) EVT_UPDATE_GIZMO(self, self.Rotate) EVT_WINDOW_DESTROY(self, self.OnDestroyWindow) self.event = threading.Event() self.event.set() # we start out in the "resting" state def __del__(self): # make sure it's stopped, since EVT_WINDOW_DESTROY may not be sent # on all platforms self.Stop() def OnDestroyWindow(self, event): # this is currently broken due to a bug in wxWindows... hopefully # it'll be fixed soon. Meanwhile be sure to explicitly call Stop() # before the gizmo is destroyed. self.Stop() event.Skip() def Draw(self, dc): dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, true) if self.overlay and self.showOverlay: dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, true) if self.label and self.showLabel: dc.DrawText(self.label, self.labelX, self.labelY) dc.SetTextForeground(wxWHITE) dc.DrawText(self.label, self.labelX-1, self.labelY-1) def OnPaint(self, event): self.Draw(wxPaintDC(self)) event.Skip() def UpdateThread(self): try: while hasattr(self, 'event') and not self.event.isSet(): wxPostEvent(self, UpdateGizmoEvent()) self.event.wait(self.frameDelay) except wxPyDeadObjectError: # BUG: we were destroyed print "Got wxPyDeadObjectError" # prg debug self.Rest() #~ return except Exception, args: import traceback traceback.print_exc() self.Rest() def Rotate(self, event): if self.event.isSet(): return self.current += self.direction if self.current >= len(self.sequence): if self.autoReverse: self.Reverse() self.current = len(self.sequence) - 1 else: self.current = 1 if self.current < 1: if self.autoReverse: self.Reverse() self.current = 1 else: self.current = len(self.sequence) - 1 self.Draw(wxClientDC(self)) # --------- public methods --------- def SetFont(self, font): """Set the font for the label""" wxPanel.SetFont(self, font) self.SetLabel(self.label) self.Draw(wxClientDC(self)) def Rest(self): """Stop the animation and return to frame 0""" self.Stop() self.current = 0 self.Draw(wxClientDC(self)) def Reverse(self): """Change the direction of the animation""" self.direction = -self.direction def Running(self): """Returns true if the animation is running""" return not self.event.isSet() def Start(self): """Start the animation""" if not self.Running(): self.event.clear() thread = threading.Thread(target = self.UpdateThread, name = "%s-thread" % self.name) thread.start() def Stop(self): """Stop the animation""" if self.event.isSet(): return self.event.set() def SetFrameDelay(self, frameDelay = 0.05): """Delay between each frame""" self.frameDelay = frameDelay def ToggleOverlay(self, state = None): """Toggle the overlay image""" if state is None: self.showOverlay = not self.showOverlay else: self.showOverlay = state self.Draw(wxClientDC(self)) def ToggleLabel(self, state = None): """Toggle the label""" if state is None: self.showLabel = not self.showLabel else: self.showLabel = state self.Draw(wxClientDC(self)) def SetLabel(self, label): """Change the text of the label""" self.label = label if label: extentX, extentY = self.GetTextExtent(label) self.labelX = (self.width - extentX)/2 self.labelY = (self.height - extentY)/2 self.Draw(wxClientDC(self)) # ------------------------------------------------------------------------------ --- NEW FILE: csmarter_events.py --- #!/bin/env python #---------------------------------------------------------------------------- # Name: # Purpose: # # Author: ISAT (D. Moore/P. Gardella) # # RCS-ID: $Id: csmarter_events.py,v 1.1 2004/08/25 21:03:17 dana_virtual Exp $ # <copyright> # Copyright 2002 BBN Technologies, LLC # under sponsorship of the Defense Advanced Research Projects Agency (DARPA). # # This program is free software; you can redistribute it and/or modify # it under the terms of the Cougaar Open Source License as published by # DARPA on the Cougaar Open Source Website (www.cougaar.org). # # THE COUGAAR SOFTWARE AND ANY DERIVATIVE SUPPLIED BY LICENSOR IS # PROVIDED 'AS IS' WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS OR # IMPLIED, INCLUDING (BUT NOT LIMITED TO) ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND WITHOUT # ANY WARRANTIES AS TO NON-INFRINGEMENT. IN NO EVENT SHALL COPYRIGHT # HOLDER BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE OF DATA OR PROFITS, # TORTIOUS CONDUCT, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THE COUGAAR SOFTWARE. # </copyright> # from wxPython.wx import * from wxPython import events wxEVT_UPDATE_SOCIETY = wxNewEventType() def EVT_UPDATE_SOCIETY(win, func): win.Connect(-1, -1, wxEVT_UPDATE_SOCIETY, func) #---------------------------------------------------------------------- class UpdateSocietyEvent(wxPyEvent): def __init__(self, msg): wxPyEvent.__init__(self) self.SetEventType(wxEVT_UPDATE_SOCIETY) self.msg = msg #---------------------------------------------------------------------- wxEVT_SOCIETYCONTROLLER_TEST = wxNewEventType() def EVT_SOCIETYCONTROLLER_TEST(win, func): win.Connect(-1, -1, wxEVT_SOCIETYCONTROLLER_TEST, func) #---------------------------------------------------------------------- class SocietyControllerEvent(wxPyEvent): def __init__(self, msg): wxPyEvent.__init__(self) self.SetEventType(wxEVT_SOCIETYCONTROLLER_TEST) self.msg = msg #---------------------------------------------------------------------- #---------------------------------------------------------------------- wxEVT_AGENT_TASK_COUNT = wxNewEventType() def EVT_AGENT_TASK_COUNT(win, func): win.Connect(-1, -1, wxEVT_AGENT_TASK_COUNT, func) #---------------------------------------------------------------------- class AgentTaskCountEvent(wxPyEvent): def __init__(self, msg): wxPyEvent.__init__(self) self.SetEventType(wxEVT_AGENT_TASK_COUNT) self.msg = msg --- NEW FILE: AWB.bat --- @echo off REM CSMARTer.bat REM Set the initial tabbed pane to be displayed REM 0 is the Overview pane REM 1 is the Rule Editor REM 2 is the Society Editor REM 3 is the Agent Laydown set INITIAL_PANE="3" python AWB.py %INITIAL_PANE% --- NEW FILE: urlDlg.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: societyViewer.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: cougaar_DragAndDrop.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: hierarchy.xml --- <?xml version='1.0' ?> <Hierarchy RootID="OSD.GOV"> <Org> <OrgID>OSD.GOV</OrgID> <Name>OSD.GOV</Name> <Rel OrgID="DLAHQ.MIL" Rel="Subordinate"/> <Rel OrgID="TRANSCOM-20.TRANSCOM.MIL" Rel="SupportSubordinate"/> <Rel OrgID="FORSCOM.MIL" Rel="Subordinate"/> <Rel OrgID="TRANSCOM-20.TRANSCOM.MIL" Rel="Subordinate"/> <Rel OrgID="DLAHQ.MIL" Rel="SupportSubordinate"/> <Rel OrgID="OSC.MIL" Rel="SupportSubordinate"/> <Rel OrgID="AWR-2.21-TSC.ARMY.MIL" Rel="SupportSubordinate"/> <Rel OrgID="HNS.MIL" Rel="Subordinate"/> <Rel OrgID="USEUCOM.MIL" Rel="Subordinate"/> <Rel OrgID="HNS.MIL" Rel="SupportSubordinate"/> <Rel OrgID="OSC.MIL" Rel="Subordinate"/> <Rel OrgID="NATO.GOV" Rel="Subordinate"/> </Org> <Org> [...11872 lines suppressed...] <OrgID>AmmoShipPacker.TRANSCOM.MIL</OrgID> <Name>AmmoShipPacker.TRANSCOM.MIL</Name> <Rel OrgID="AmmoSea.TRANSCOM.MIL" Rel="ConverseOfShipPackingTransportationProvider"/> <Rel OrgID="AmmoSea.TRANSCOM.MIL" Rel="Superior"/> </Org> <Org> <OrgID>AmmoConusGround.TRANSCOM.MIL</OrgID> <Name>AmmoConusGround.TRANSCOM.MIL</Name> <Rel OrgID="AmmoSea.TRANSCOM.MIL" Rel="ConverseOfToPOEGroundTransportationProvider"/> <Rel OrgID="AmmoSea.TRANSCOM.MIL" Rel="Superior"/> </Org> <Org> <OrgID>DLAHQ.MIL</OrgID> <Name>DLAHQ.MIL</Name> <Rel OrgID="OSD.GOV" Rel="SupportSuperior"/> <Rel OrgID="343-SUPPLYCO.29-SPTGP.21-TSC.ARMY.MIL" Rel="SubsistenceSupplyCustomer"/> <Rel OrgID="200-MMC.21-TSC.ARMY.MIL" Rel="SparePartsCustomer"/> <Rel OrgID="OSD.GOV" Rel="Superior"/> </Org> </Hierarchy> --- NEW FILE: insertion_dialog.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: societyEditor.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mySociety.py --- import sys import os from wxPython.wx import * from wxPython.ogl import * #--------------------------------------------------------------------------- # The class which is a representation of the Facets in the society class myFacet: # Init for a Facet myFacetName = "noname" myFacetParent = "noparent" myFacetType = "SOURCEFACET" myFacetLevel = "0" myFacetPen = wxBLACK_PEN myFacetBrush = '#800080' myFacetText = "Source" myFacetTextColour = "LIGHT GREY" myFacetShow = "true" myFacetViewDepth = "-1" children = [] # Set up the Facet type which initilizes all the properties of a given Facet def setFacetType(self, facetname, facettype, facetparent): if (facettype == "SOURCEFACET"): self.myFacetName = facetname self.myFacetParent = facetparent self.myFacetType = "SOURCEFACET" self.myFacetLevel = "0" self.myFacetBrush = wxBrush("#800080", wxSOLID) self.myFacetText = "Source" self.myFacetTextColour = "LIGHT GREY" elif (facettype == "HOSTFACET"): self.myFacetName = facetname self.myFacetParent = facetparent self.myFacetType = "HOSTFACET" self.myFacetLevel = "1" self.myFacetBrush = wxBrush("#0000FF", wxSOLID) self.myFacetText = "Host" self.myFacetTextColour = "YELLOW" elif (facettype == "NODEFACET"): self.myFacetName = facetname self.myFacetParent = facetparent self.myFacetType = "NODEFACET" self.myFacetLevel = "2" self.myFacetBrush = wxBrush("#FF0000", wxSOLID) self.myFacetText = "Node" self.myFacetTextColour = "YELLOW" elif (facettype == "AGENTFACET"): self.myFacetName = facetname self.myFacetParent = facetparent self.myFacetType = "AGENTFACET" self.myFacetLevel = "3" self.myFacetBrush = wxBrush("#008000", wxSOLID) self.myFacetText = "Agent" self.myFacetTextColour = "YELLOW" elif(facettype == "COMPONENTFACET"): self.myFacetName = facetname self.myFacetParent = facetparent self.myFacetType = "COMPONENTFACET" self.myFacetLevel = "4" self.myFacetBrush = wxBrush("#FFFF00", wxSOLID) self.myFacetText = "Component" self.myFacetTextColour = "DARK GREEN" elif(facettype == "Level6"): self.myFacetName = facetname self.myFacetParent = facetparent self.myFacetType = "Level6" self.myFacetLevel = "5" self.myFacetBrush = wxBrush("#FFFF11", wxSOLID) self.myFacetText = "Component" self.myFacetTextColour = "DARK GREEN" elif(facettype == "Level7"): self.myFacetName = facetname self.myFacetParent = facetparent self.myFacetType = "Level7" self.myFacetLevel = "5" self.myFacetBrush = wxBrush("#11FF11", wxSOLID) self.myFacetText = "Component" self.myFacetTextColour = "DARK GREEN" else: self.myFacetName = "noname" self.myFacetParent = "noparent" self.myFacetType = "UNKNOWN" self.myFacetLevel = "-1" self.myFacetBrush = "WHITE" self.myFacetText = "UNK" self.myFacetTextColour = "BLACK" def getFacetType(self): return self.myFacetType def getFacetBrush(self): return self.myFacetBrush def getFacetText(self): return self.myFacetTextColour #--------------------------------------------------------------------------- # This is the society class which cotains the connections within the society # The is used to remember what levels each facet is on and what each facet is connected to class mySociety: def __init__(self): self.maxdepth = 0 self.facetLevelsList = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] self.levelIndex = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] self.facetList = [] self.tempList = [] self.removeList = [] self.addList = [] self.connectionsDictionary = {} self.hiddenConnectionsDictionary = {} print "New Society Created" self.connectionsDictionary.clear() def __del__(self): del self.facetLevelsList[0:] del self.levelIndex[0:] del self.tempList[0:] del self.removeList[0:] del self.addList[0:] self.connectionsDictionary.clear() self.hiddenConnectionsDictionary.clear() def ClearFacetList(self): self.facetList = [] #~ self.tempList = [] #~ self.removeList = [] self.addList = [] def AddNewFacet(self, name = "noname", type = "SOURCEFACET", level = 0, parent = "noparent"): newFacet = myFacet() newFacet.setFacetType(name, type,parent) self.facetList.append(newFacet) if (parent == "noparent"): self.connectionsDictionary[name] = [] self.facetLevelsList[level] += 1 else: self.facetLevelsList[level] += 1 # if there is no key add it initilizes if (parent in self.connectionsDictionary.keys()): self.connectionsDictionary[parent] += [name] # else if there is a key else: self.connectionsDictionary[parent] = [name] def getFacetList(self): del self.tempList[0:] self.makeLevelIndex() for k in self.facetList: if k.myFacetShow == "true": self.tempList.append(-1) self.sortFacets("noparent", len(self.facetList),self.facetList,0) #~ del self.facetList[0:] #~ self.facetList = self.facetList + self.tempList #~ if self.facetList: #~ self.getDepth(self.facetList[0]) return self.tempList def hideAll(self): self.organizeConnections(self.facetList[0].myFacetName, 0) self.facetList[0].myFacetShow = "false" self.facetLevelsList[0] = 0 def getConnectionsDictionary(self): return self.connectionsDictionary def getFacetLevelList(self): return self.facetLevelsList def getFacetDepth(self, fdSearchString): idx = 0 while idx < len(self.facetList): if self.facetList[idx].myFacetName == fdSearchString: idx+=1 def makeLevelIndex(self): prevtotal = 0 idx = 0 for i in self.facetLevelsList: if i==0: continue self.levelIndex[idx] = prevtotal prevtotal+=i idx+=1 def sortFacets(self,searchString, theFacetListLength, theFacetList, depth): if theFacetListLength == 0: return count = 0 searhStringList = [] delFacetsList = [] while (count < theFacetListLength): if (searchString == theFacetList[count].myFacetParent and theFacetList[count].myFacetShow == "true"): self.tempList[self.levelIndex[depth]] = theFacetList[count] self.levelIndex[depth]+=1 searhStringList.append(theFacetList[count].myFacetName) delFacetsList.append(count) count+=1 depth+=1 for i in theFacetList: del i for i in searhStringList: self.sortFacets(i, len(theFacetList), theFacetList,depth) def getDepth(self,currentFacet): self.maxdepth = 0 self.countChildren(currentFacet, 0) return self.maxdepth def countChildren(self, currNode,depth=0): if depth > self.maxdepth: self.maxdepth = depth if self.connectionsDictionary.has_key(currNode) == 1: depth+=1 for i in self.connectionsDictionary[currNode]: self.countChildren(i, depth) self.myFacetViewDepth(i,depth) elif self.hiddenConnectionsDictionary.has_key(currNode) == 1: depth+=1 for j in self.hiddenConnectionsDictionary[currNode]: self.countChildren(j, depth) self.myFacetViewDepth(j,depth) def myFacetViewDepth(self, currNode, depth): for i in self.facetList: if i.myFacetName == currNode: i.myFacetViewDepth = abs(self.maxdepth-depth) def organizeConnections(self, cN, vD, cD=0): #cN: Current Node / vD: View Depth / cD: Current Depth if vD == -1: vD = self.maxdepth del self.removeList[0:] for j in self.facetList: if j.myFacetName == cN: prevvD = j.myFacetViewDepth vD+=int(j.myFacetLevel) cD+=int(j.myFacetLevel) j.myFacetViewDepth = vD continue #~ print "Current Depth: ", cD, "\nPrev View Depth: ", prevvD , "\nView Depth: ", vD if prevvD < vD: self.addConn(cN, vD, cD) for k in self.facetList: if k.myFacetName in self.addList: k.myFacetShow = "true" #~ print self.facetLevelsList else: self.removeConn(cN, vD, cD) for i in self.facetList: if i.myFacetName in self.removeList: i.myFacetShow = "false" #~ print self.facetLevelsList def removeConn(self, currNode, viewdepth, currdepth=0): if self.connectionsDictionary.has_key(currNode) == 1: currdepth+=1 for i in self.connectionsDictionary[currNode]: self.removeConn(i,viewdepth, currdepth) if viewdepth <= currdepth-1: self.hiddenConnectionsDictionary[currNode] = self.connectionsDictionary[currNode] self.removeList += self.connectionsDictionary[currNode] #~ print str(currdepth) + " " +str(len(self.connectionsDictionary[currNode])) self.facetLevelsList[currdepth]-=len(self.connectionsDictionary[currNode]) del self.connectionsDictionary[currNode] def addConn(self,currNode, viewdepth, currdepth=0): if self.connectionsDictionary.has_key(currNode) == 1: currdepth+=1 for i in self.connectionsDictionary[currNode]: self.addConn(i,viewdepth,currdepth) if self.hiddenConnectionsDictionary.has_key(currNode) == 1: currdepth+=1 for j in self.hiddenConnectionsDictionary[currNode]: self.addConn(j,viewdepth,currdepth) if viewdepth > currdepth-1: self.connectionsDictionary[currNode] = self.hiddenConnectionsDictionary[currNode] self.addList += self.hiddenConnectionsDictionary[currNode] self.facetLevelsList[currdepth]+=len(self.hiddenConnectionsDictionary[currNode]) del self.hiddenConnectionsDictionary[currNode] #--------------------------------------------------------------------------- #~ TheSociety = mySociety() # Create the society #TheSociety.AddNewFacet("Root", "SOURCEFACET", 0, "noparent") #TheSociety.AddNewFacet("Child1", "HOSTFACET", 1, "Root") #TheSociety.AddNewFacet("Child2", "HOSTFACET", 1, "Root") #TheSociety.AddNewFacet("Child3", "HOSTFACET", 1, "Root") #TheSociety.AddNewFacet("SubChild1", "NODEFACET", 2, "Child3") #TheSociety.AddNewFacet("SubChild2", "NODEFACET", 2, "Child1") #TheSociety.AddNewFacet("SubSubChild1", "AGENTFACET", 3, "SubChild1") #TheSociety.getFacetList() #print TheSociety.getFacetList() --- NEW FILE: gizmoImages.py --- #---------------------------------------------------------------------- # This file was generated by encode_bitmaps.py # from wxPython.wx import wxImageFromStream, wxBitmapFromImage import cStringIO catalog = {} index = [] class ImageClass: pass def get001Data(): return \ '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00"\x00\x00\x00"\x08\x06\x00\ \x00\x00:G\x0b\xc2\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x07\ \x9fIDATx\x9c\xcd\x98_o\xdbF\x16\xc5\x7f\xf7\xce\x0c\xa5\xc8\xb2];N\xea4M\ \x8a\xc2@\xb6[\xa0E\xd1\xa2o]\xf4#\xef\x17\xd8\xa7}\xeck\x8b\x16}\t\x908\x9b\ \x7fnc\xc9\x96H\x0e\x87\x9c\xd9\x87\x19QR\xd2\xf7]\x02\xf4P\xb2L\x1e\x9d{\ [...3038 lines suppressed...] f\xb3\xcf9<<\xa2\xaa\xd6\xac\x16s\xbc_\xb3Z\xafX\xae\x16\x18\x9d\xe7R\xeb\ \xd2\x9e\xd9\xbad\x82\xb6\xe8K\x95g\xca\x9c\xfb\xfd\xd7\x02{>"\x92v\xe51\xa6\ \xbd\xa8\xd2\x01\x1d4\xa2@b@b$F\xa1(\xc6\x1c\xdf{\x80\xc4\xfbD\x89\xe9&\x92_\ P\x88\xf47\xbd\xbd\xaa\xac\x0e\xa5\xd8\x9b\xf4D\x04bO\x8a\x7f\xc7\x8b\x9a\ \xbf\x01\xfc\t\xfa\\\xad\xe0v?\x00\x00\x00\x00IEND\xaeB`\x82' def getrestBitmap(): return wxBitmapFromImage(getrestImage()) def getrestImage(): stream = cStringIO.StringIO(getrestData()) return wxImageFromStream(stream) index.append('rest') catalog['rest'] = ImageClass() catalog['rest'].getData = getrestData catalog['rest'].getImage = getrestImage catalog['rest'].getBitmap = getrestBitmap --- NEW FILE: AWB.py --- #!/bin/env python #---------------------------------------------------------------------------- # Name: CS03.py # Purpose: AWB umbrella # # Author: ISAT (D. Moore # # RCS-ID: $Id: AWB.py,v 1.1 2004/08/25 21:03:17 dana_virtual Exp $ # <copyright> # Copyright 2002 BBN Technologies, LLC # under sponsorship of the Defense Advanced Research Projects Agency (DARPA). # # This program is free software; you can redistribute it and/or modify # it under the terms of the Cougaar Open Source License as published by # DARPA on the Cougaar Open Source Website (www.cougaar.org). # # THE COUGAAR SOFTWARE AND ANY DERIVATIVE SUPPLIED BY LICENSOR IS # PROVIDED 'AS IS' WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS OR # IMPLIED, INCLUDING (BUT NOT LIMITED TO) ALL IMPLIED WARRANTIES OF [...1157 lines suppressed...] Use the Society Editor to view or manually edit a society. When viewing a society, changes just made by applying a rule (from the Rule Editor) are highlighted in cyan. To manually edit the society, select an item by left clicking on it, then left click again to change its name and/or value, or right click to view a menu from which adds, deletes, and changes can be made. <p> <h2>Agent Laydown</h2> Use the Agent Laydown to allocate agents (from a list of agents) to hosts (from a list of hosts). The allocation can be done automatically by distributing the agents evenly among the hosts or by specifying the number of agents to put on each host, or it can be done manually by dragging and dropping agents and/or nodes from the agent list to hosts on the host list. There are capabilities for quickly creating societies and for adding/removing/editing facets. When society manipulation is complete, the new or revised society can be saved to an XML file. Agent Laydown does not permit working with society entities below the Agent level, but for operations at or above that level, Agent Laydown is more versatile than Society Editor. </body></html> """ #---------------------------------------------------------------------------- if __name__ == '__main__': main() --- NEW FILE: AgentDataCollector.py --- from threading import Thread, Semaphore from __future__ import generators import re import string import urllib import time concurrentProcesses = 10 mutex = Semaphore(value=concurrentProcesses) class AgentHTMLParser(Thread): def __init__(self, url=0, aname="No Name"): Thread.__init__(self) self.name = aname self.ratio = -1 self.totalTasks= -1 self.unplannedTasks = -1 self.unestimatedTasks = -1 self.failedTasks = -1 self.unconfidentTasks = -1 self.siteurl = url self.returnlist = [] def run(self): self.getPage() def getPage(self): if self.siteurl == 0: return else: mutex.acquire() self.file = urllib.urlopen(self.siteurl) mutex.release() # Parse the website and collect the data though regular expressions for self.i in self.file.readlines(): totalRe = re.compile('Number of Tasks: <b>(.*)') ratioRe = re.compile('GLMCompletion ratio:.*<b>(.?[0-9]+)') unplannedRe = re.compile('<.*Unplanned Tasks\[(.*)\]') unestimatedRe = re.compile('<.*Unestimated Tasks\[(.*)\]') failRe= re.compile('<.*Failed Tasks\[(.*)\]') unconfidentRe = re.compile('<.*Unconfident Tasks\[(.*)\]') ans = totalRe.match(self.i) if ans: self.totalTasks = ans.group(1) ans = ratioRe.match(self.i) if ans: self.ratio = ans.group(1) ans = unplannedRe.match(self.i) if ans: self.unplannedTasks = ans.group(1) ans = unestimatedRe.match(self.i) if ans: self.unestimatedTasks = ans.group(1) ans = failRe.match(self.i) if ans: self.failedTasks = ans.group(1) ans = unconfidentRe.match(self.i) if ans: self.unconfidentTasks = ans.group(1) # Add all the elemets to a list for returning self.returnlist.append(str(self.totalTasks)) self.returnlist.append(str(self.ratio)) self.returnlist.append(str(self.unplannedTasks)) self.returnlist.append(str(self.unestimatedTasks)) self.returnlist.append(str(self.failedTasks)) self.returnlist.append(str(self.unconfidentTasks)) self.returnlist.append(self.name) def getInfo(self): return self.returnlist def SocietyQuery(societyAddress): # Path Style # http://sm056:8801/$1-1-CAVSQDN.AVNBDE.1-AD.ARMY.MIL/completion?showTables=true&viewType=viewAgentBig # A = AgentHTMLParser("completionbft.htm") Agent_Names = [] agentfile = urllib.urlopen(societyAddress) ThreadList = [] MainOut = [] QueryDictionary = {} start = time.clock() # Read in the names of all the agents and store them to an agent list [^.comm] for agentline in agentfile: AgentNameRE = re.compile('^<.*\/\$(.*.[^com])\/list') AgentHostRE = re.compile('^<.*Agents on host \((.*)\)') agentString = AgentNameRE.match(agentline) hostString = AgentHostRE.match(agentline) if hostString: agentHost = hostString.group(1) if agentString: Agent_Names.append(agentString.group(1)) # Loop though all the angets and get the information from the server #~ print Agent_Names for i in Agent_Names: agentInfoURL = "http://" + agentHost + "/$" + i + "/completion?showTables=true&viewType=viewAgentBig" AHP = AgentHTMLParser(agentInfoURL, i) #~ AHP.getPage() #~ Out += AHP.getInfo() AHP.start() ThreadList.append(AHP) for retriever in ThreadList: retriever.join() agentInformation = retriever.getInfo() agentName = agentInformation.pop() QueryDictionary[agentName] = agentInformation looptime = time.clock()-start print "\nNumber of Agnets: \t" + str(len(Agent_Names)) + "\nProcessing Time: \t" + str(looptime) + " seconds\n" + "Society Server: \t" return QueryDictionary #~ dict = SocietyQuery() concurrentProcesses = 1 mutex = Semaphore(value=concurrentProcesses) dict = SocietyQuery('http://u142:8800/agents?suffix=.') print "Number of Threads: \t" + str(concurrentProcesses) print str(dict) --- NEW FILE: .cvsignore --- insertion_dialog.pyc societyViewer.pyc agentLaydown.pyc cougaar_DragAndDrop.pyc CS03.pyc CSMARTer.log csmarter_events.pyc editorTextControl.pyc gizmo.pyc gizmoImages.pyc images.pyc insertion_dialog.pyc run.pyc simpleCanvas.pyc societyBuilder.pyc societyController.pyc societyEditor.pyc societyFactoryServer.pyc debug.pyc eventFactory.pyc urlDlg.pyc hierarchyJD.html societyController.py~ societyVisualModel.pyc zoomer.pyc awb.list.p awb.urls.p facetProperties.pyc globalConstants.pyc PollingServices --- NEW FILE: societyReader.py --- import sys import re import urllib2 from urlparse import urlparse import random as r import time import os, string import thread import httplib from screenScraper import * #~ htmlText = ''' <html><head><title>Agents at the Root ("<a href="/agents?suffix=.">.</a>")</title></head> #~ <body><p><h1>Agents at the Root ("<a href="/agents?suffix=.">.</a>")</h1> #~ <table border="0"> #~ <tr><td align="right"> 1. </td><td align="right"><a href="/agents?suffix=.comm">.comm</a></td></tr> #~ <tr><td align="right"> 2. </td><td align="right"><a href="/$PlannerAgent/list">PlannerAgent</a></td></tr> #~ <tr><td align="right"> 3. </td><td align="right"><a href="/$PlannerAgent2/list">PlannerAgent2</a></td></tr> #~ </table> #~ <p> #~ <a href="/agents">Agents on host (fpga:8800)</a><br> #~ <a href="/agents?suffix=.">Agents at the root (.)</a><br></body></html> #~ ''' class SocietyReader: def __init__(self, url): self.url = url def readAgents(self): f = urllib2.urlopen(self.url) htmlText= f.read() # reads the whole page as a big glob f.close() return self.scrapeHTML(htmlText) def scrapeHTML(self, htmlText): self.agentList = [] scraper = BeautifulSoup() scraper.feed(htmlText) print ">>>\n", list = scraper.fetch('a', {'href':'/$%'}) #~ for l in list: #~ print "AREF >>>", l #~ print "\n\n Second tests..." #~ print 'Fetch List...' for s in list: s = str(s) print 's >>>', s start = string.index(s, ">") end = string.rindex(s, "<") t = s[start+1:end] print "AREF...", t self.agentList.append(str(t)) #~ alphabet = [ #~ 'Alpha','Beta','Gamma','Delta','Epsilon', #~ 'Zeta','Eta','Theta','Iota','Kappa', #~ 'Lambda','Mu','Nu','Xi','Omicron', #~ 'Pi','Rho','Sigma','Tau','Upsilon', #~ 'Phi','Chi','Psi','Omega' #~ ] #~ for item in alphabet: #~ self.agentList.append(item) return self.agentList fyi = ''' http://192.233.51.210:8800/$PlanAnalyzerAgent/tasks?mode=12&limit=true&formType=3&uid=formSubmit=Search ''' def readUniqueObjects(self, host,port): self.uniqueObjects = {} uniqueObjectsQuery = '/tasks?mode=12&limit=true&formType=3&uid=formSubmit=Search' if len(self.agentList) == None: return for agent in self.agentList: wellformedURL = 'http://'+host+':'+port+ '/$' + agent +uniqueObjectsQuery print 'wellformedURL', wellformedURL f = urllib2.urlopen(wellformedURL) htmlText= f.read() # reads the whole page as a big glob f.close() scraper = BeautifulSoup() scraper.feed(htmlText) elements = scraper.fetch('center') #~ print "elements>>>", elements elt = str(elements[0]) elt = elt[elt.index('<b>')+3:elt.index('</b>')] self.uniqueObjects[str(agent)] = elt # add dummy: self.uniqueObjects['---'] = '---' # not sure why you need to do - bug in DividedShape?? #~ print 'uniqueObjects', self.uniqueObjects return self.uniqueObjects def __str__(self): return "Agents >>>" + self.url --- NEW FILE: zoomer.pyc --- (This appears to be a binary file; contents omitted.) --- NEW FILE: screenScraper.py --- from sgmllib import SGMLParser import string import types class PageElement: """Contains the navigational information for some part of the page (either a tag or a piece of text)""" def __init__(self, parent=None, previous=None): self.parent = parent self.previous = previous self.next = None class NavigableText(PageElement): """A simple wrapper around a string that keeps track of where in the document the string was found. Doesn't implement all the string methods because I'm lazy. You could have this extend UserString if you were using 2.2.""" def __init__(self, string, parent=None, previous=None): PageElement.__init__(self, parent, previous) self.string = string def __eq__(self, other): return self.string == str(other) def __str__(self): return self.string def strip(self): return self.string.strip() class Tag(PageElement): """Represents a found HTML tag with its attributes and contents.""" def __init__(self, name, attrs={}, parent=None, previous=None): PageElement.__init__(self, parent, previous) self.name = name self.attrs = attrs self.contents = [] self.foundClose = 0 def get(self, key, default=None): return self._getAttrMap().get(key, default) def __call__(self, *args): return apply(self.fetch, args) def __getitem__(self, key): return self._getAttrMap()[key] def __setitem__(self, key, value): self._getAttrMap() self.attrMap[key] = value for i in range(0, len(self.attrs)): if self.attrs[i][0] == key: self.attrs[i] = (key, value) def _getAttrMap(self): if not hasattr(self, 'attrMap'): self.attrMap = {} for (key, value) in self.attrs: self.attrMap[key] = value return self.attrMap def __repr__(self): return str(self) def __ne__(self, other): return not self == other def __eq__(self, other): if not isinstance(other, Tag) or self.name != other.name or self.attrs != other.attrs or len(self.contents) != len(other.contents): return 0 for i in range(0, len(self.contents)): if self.contents[i] != other.contents[i]: return 0 return 1 def __str__(self): attrs = '' if self.attrs: for key, val in self.attrs: attrs = attrs + ' %s="%s"' % (key, val) close = '' closeTag = '' if self.isSelfClosing(): close = ' /' elif self.foundClose: closeTag = '</%s>' % self.name s = self.renderContents() if not hasattr(self, 'hideTag'): s = '<%s%s%s>' % (self.name, attrs, close) + s + closeTag return s def renderContents(self): s='' #non-Unicode for c in self.contents: try: s = s + str(c) except UnicodeEncodeError: if type(s) <> types.UnicodeType: s = s.decode('utf8') #convert ascii to Unicode #str() should, strictly speaking, not return a Unicode #string, but NavigableText never checks and will return #Unicode data if it was initialised with it. s = s + str(c) return s def isSelfClosing(self): return self.name in BeautifulSoup.SELF_CLOSING_TAGS def append(self, tag): self.contents.append(tag) def first(self, name=None, attrs={}, contents=None, recursive=1): r = None l = self.fetch(name, attrs, contents, recursive) if l: r = l[0] return r def fetch(self, name=None, attrs={}, contents=None, recursive=1): """Extracts Tag objects that match the given criteria. You can specify the name of the Tag, any attributes you want the Tag to have, and what text and Tags you want to see inside the Tag.""" if contents and type(contents) != type([]): contents = [contents] results = [] for i in self.contents: if isinstance(i, Tag): if not name or i.name == name: match = 1 for attr, value in attrs.items(): check = i.get(attr) #By default, find the specific value called for. #Use SQL-style wildcards to find substrings, prefix, #suffix, etc. result = (check == value) if check and value: if len(value) > 1 and value[0] == '%' and value[-1] == '%' and value[-2] != '\\': result = (check.find(value[1:-1]) != -1) elif value[0] == '%': result = check.rfind(value[1:]) == len(check)-len(value)+1 elif value[-1] == '%': result = check.find(value[:-1]) == 0 if not result: match = 0 break match = match and (not contents or i.contents == contents) if match: results.append(i) if recursive: results.extend(i.fetch(name, attrs, contents, recursive)) return results class BeautifulSoup(SGMLParser, Tag): """The actual parser. It knows the following facts about HTML, and not much else: * Some tags have no closing tag and should be interpreted as being closed as soon as they are encountered. * Most tags can't be nested; encountering an open tag when there's already an open tag of that type in the stack means that the previous tag of that type should be implicitly closed. However, some tags can be nested. When a nestable tag is encountered, it's okay to close all unclosed tags up to the last nestable tag. It might not be safe to close any more, so that's all it closes. * The text inside some tags (ie. 'script') may contain tags which are not really part of the document and which should be parsed as text, not tags. If you want to parse the text as tags, you can always get it and parse it explicitly.""" SELF_CLOSING_TAGS = ['br', 'hr', 'input', 'img', 'meta', 'spacer'] NESTABLE_TAGS = ['font', 'table', 'tr', 'td', 'th', 'tbody', 'p'] QUOTE_TAGS = ['script'] IMPLICITLY_CLOSE_TAGS = 1 def __init__(self, text=None): Tag.__init__(self, '[document]') SGMLParser.__init__(self) self.quoteStack = [] self.hideTag = 1 self.reset() if text: self.feed(text) def feed(self, text): SGMLParser.feed(self, text) self.endData() def reset(self): SGMLParser.reset(self) self.currentData = '' self.currentTag = None self.tagStack = [] self.pushTag(self) def popTag(self, closedTagName=None): tag = self.tagStack.pop() if closedTagName == tag.name: tag.foundClose = 1 #print "Pop", tag.name self.currentTag = self.tagStack[-1] return self.currentTag def pushTag(self, tag): #print "Push", tag.name if self.currentTag: self.currentTag.append(tag) self.tagStack.append(tag) self.currentTag = self.tagStack[-1] def endData(self): if self.currentData: if not string.strip(self.currentData): if '\n' in self.currentData: self.currentData = '\n' else: self.currentData = ' ' o = NavigableText(self.currentData, self.currentTag, self.previous) if self.previous: self.previous.next = o self.previous = o self.currentTag.contents.append(o) self.currentData = '' def _popToTag(self, name, closedTag=0): """Pops the tag stack up to and including the most recent instance of the given tag. If a list of tags is given, will accept any of those tags as an excuse to stop popping, and will *not* pop the tag that caused it to stop popping.""" if self.IMPLICITLY_CLOSE_TAGS: closedTag = 1 numPops = 0 mostRecentTag = None oneTag = (type(name) == types.StringType) for i in range(len(self.tagStack)-1, 0, -1): thisTag = self.tagStack[i].name if (oneTag and thisTag == name) \ or (not oneTag and thisTag in name): numPops = len(self.tagStack)-i break if not oneTag: numPops = numPops - 1 closedTagName = None if closedTag: closedTagName = name for i in range(0, numPops): mostRecentTag = self.popTag(closedTagName) return mostRecentTag def unknown_starttag(self, name, attrs): if self.quoteStack: #This is not a real tag. #print "<%s> is not real!" % name attrs = map(lambda(x, y): '%s="%s"' % (x, y), attrs) self.handle_data('<%s %s>' % (name, attrs)) return self.endData() tag = Tag(name, attrs, self.currentTag, self.previous) if self.previous: self.previous.next = tag self.previous = tag if not name in self.SELF_CLOSING_TAGS: if name in self.NESTABLE_TAGS: self._popToTag(self.NESTABLE_TAGS) else: self._popToTag(name) self.pushTag(tag) if name in self.SELF_CLOSING_TAGS: self.popTag() if name in self.QUOTE_TAGS: #print "Beginning quote (%s)" % name self.quoteStack.append(name) def unknown_endtag(self, name): if self.quoteStack and self.quoteStack[-1] != name: #This is not a real end tag. #print "</%s> is not real!" % name self.handle_data('</%s>' % name) return self.endData() self._popToTag(name, 1) if self.quoteStack and self.quoteStack[-1] == name: #print "That's the end of %s!" % self.quoteStack[-1] self.quoteStack.pop() def handle_data(self, data): self.currentData = self.currentData + data def handle_comment(self, text): "Propagate comments right through." self.handle_data("<!--%s-->" % text) def handle_charref(self, ref): "Propagate char refs right through." self.handle_data('&#%s;' % ref) def handle_entityref(self, ref): "Propagate entity refs right through." self.handle_data('&%s;' % ref) def handle_decl(self, data): "Propagate DOCTYPEs right through." self.handle_data('<!%s>' % data) class BeautifulStoneSoup(BeautifulSoup): """A version of BeautifulSoup that doesn't know anything at all about what HTML tags have special behavior. Useful for parsing things that aren't HTML, or when BeautifulSoup makes an assumption counter to what you were expecting.""" IMPLICITLY_CLOSE_TAGS = 0 SELF_CLOSING_TAGS = [] NESTABLE_TAGS = [] QUOTE_TAGS = [] htmlText = ''' <html><head><title>Agents at the Root ("<a href="/agents?suffix=.">.</a>")</title></head> <body><p><h1>Agents at the Root ("<a href="/agents?suffix=.">.</a>")</h1> <table border="0"> <tr><td align="right"> 1. </td><td align="right"><a href="/agents?suffix=.comm">.comm</a></td></tr> <tr><td align="right"> 2. </td><td align="right"><a href="/$PlannerAgent/list">PlannerAgent</a></td></tr> <tr><td align="right"> 3. </td><td align="right"><a href="/$PlannerAgent2/list">PlannerAgent2</a></td></tr> </table> <p> <a href="/agents">Agents on host (fpga:8800)</a><br> <a href="/agents?suffix=.">Agents at the root (.)</a><br></body></html> ''' # ~~~~~~ # quickie tester: #~ text = ''' <html><head><title>Agents at the Root ("<a href="/agents?suffix=.">.</a>")</title></head> #~ <body><p><h1>Agents at the Root ("<a href="/agents?suffix=.">.</a>")</h1> #~ <table border="0"> #~ <tr><td align="right"> 1. </td><td align="right"><a href="/agents?suffix=.comm">.comm</a></td></tr> #~ <tr><td align="right"> 2. </td><td align="right"><a href="/$PlannerAgent/list">PlannerAgent</a></td></tr> #~ <tr><td align="right"> 3. </... [truncated message content] |
From: Dana M. <dan...@us...> - 2004-08-25 21:03:33
|
Update of /cvsroot/pydev/awb/src/Python/Sample-Laydowns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/src/Python/Sample-Laydowns Added Files: Host-with-webs.xml HostWebs.xml TIC-sample.xml tiny-tc7-61a65v.plugins.xml Log Message: wholesale commit --- NEW FILE: HostWebs.xml --- <?xml version='1.0'?> <society name='svcloudA-hosts'> <host name='sv024'> <facet uriname='sv024-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv025'> <facet uriname='sv025-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv026'> <facet uriname='sv026-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv027'> <facet uriname='sv027-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv028'> <facet uriname='sv028-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv029'> <facet uriname='sv029-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv030'> <facet uriname='sv030-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv031'> <facet uriname='sv031-utb'/> <facet service='acme'/> <facet service='nameserver'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv032'> <facet uriname='sv032-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv033'> <facet uriname='sv033-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv034'> <facet uriname='sv034-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv035'> <facet uriname='sv035-utb'/> <facet service='acme'/> <facet service='Web0Gen'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv036'> <facet uriname='sv036-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv037'> <facet uriname='sv037-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv038'> <facet uriname='sv038-utb'/> <facet service='acme'/> <facet service='Web1Gen'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv039'> <facet uriname='sv039-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv040'> <facet uriname='sv040-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv041'> <facet uriname='sv041-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv042'> <facet uriname='sv042-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv043'> <facet uriname='sv043-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv044'> <facet uriname='sv044-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv045'> <facet uriname='sv045-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv046'> <facet uriname='sv046-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv047'> <facet uriname='sv047-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv048'> <facet uriname='sv048-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv049'> <facet uriname='sv049-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv050'> <facet uriname='sv050-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv051'> <facet uriname='sv051-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> </host> <host name='sv052'> <facet uriname='sv052-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> </host> <host name='sv053'> <facet uriname='sv053-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> </host> <host name='sv054'> <facet uriname='sv054-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv055'> <facet uriname='sv055-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv062'> <facet uriname='sv062-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv063'> <facet uriname='sv063-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> </host> <host name='sv064'> <facet uriname='sv064-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> </host> <host name='sv065'> <facet uriname='sv065-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> </host> <host name='sv066'> <facet uriname='sv066-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv067'> <facet uriname='sv067-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv068'> <facet uriname='sv068-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv069'> <facet uriname='sv069-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv070'> <facet uriname='sv070-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv071'> <facet uriname='sv071-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv072'> <facet uriname='sv072-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv073'> <facet uriname='sv073-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv074'> <facet uriname='sv074-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv075'> <facet uriname='sv075-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv126'> <facet uriname='sv126-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv127'> <facet uriname='sv127-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv128'> <facet uriname='sv128-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv129'> <facet uriname='sv129-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv130'> <facet uriname='sv130-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv131'> <facet uriname='sv131-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv132'> <facet uriname='sv132-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv133'> <facet uriname='sv133-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv134'> <facet uriname='sv134-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv135'> <facet uriname='sv135-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv158'> <facet uriname='sv158-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv159'> <facet uriname='sv159-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv160'> <facet uriname='sv160-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv161'> <facet uriname='sv161-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv162'> <facet uriname='sv162-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv163'> <facet uriname='sv163-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv164'> <facet uriname='sv164-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv167'> <facet uriname='sv167-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv168'> <facet uriname='sv168-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv169'> <facet uriname='sv169-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv170'> <facet uriname='sv170-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv171'> <facet uriname='sv171-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv172'> <facet uriname='sv172-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> </society> --- NEW FILE: tiny-tc7-61a65v.plugins.xml --- <?xml version='1.0'?> <society name='tiny-1ad-tc7.facets' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.cougaar.org/2003/society.xsd'> <host name='localhost'> <node name='localnode'> <class> org.cougaar.bootstrap.Bootstrapper </class> <vm_parameter> -Dorg.cougaar.node.name=localnode </vm_parameter> <component name='org.cougaar.community.CommunityPlugin()' class='org.cougaar.community.CommunityPlugin' priority='COMPONENT' insertionpoint='Node.AgentManager.Agent.PluginManager.Plugin'> </component> <component [...79197 lines suppressed...] <argument> forward.xml </argument> </component> <component name='org.cougaar.core.qos.metrics.PersistenceAdapterPlugin' class='org.cougaar.core.qos.metrics.PersistenceAdapterPlugin' priority='COMPONENT' insertionpoint='Node.AgentManager.Agent.PluginManager.Plugin'> </component> <component name='org.cougaar.yp.YPClientComponent()' class='org.cougaar.yp.YPClientComponent' priority='COMPONENT' insertionpoint='Node.AgentManager.Agent.YPService'> </component> </agent> </node> </host> </society> --- NEW FILE: TIC-sample.xml --- <?xml version='1.0'?> <society name='svcloudA-hosts'> <host name='sv007'> <facet service='cougaar-db'/> <facet service='smtp'/> </host> <host name='u133-utb'> <facet service='cnccalc-db'/> </host> <host name='acmev7'> <facet service='jabber'/> </host> <host name='sb042'> <facet service='analysis'/> </host> <host name='sv007-utb'> <facet service='nfs-shared'/> <facet service='nfs-software'/> <facet service='grabber-db'/> <facet service='smtp'/> </host> <host name='sa007'> <facet service='smtp'/> </host> <host name='sb007'> <facet service='smtp'/> </host> <host name='sc007'> <facet service='smtp'/> </host> <host name='sv008'> <facet service='smtp'/> </host> <host name='sv022'> <facet service='operator'/> </host> <host name='sv023'> <facet service='BW-router'/> </host> <host name='sv024'> <facet uriname='sv024-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv023_NODE_0'> <agent name='1-PLT.RECON-DET.1-CABN.1-UA.ARMY.MIL-FCS-RS-V-1'/> <agent name='1-PLT.RECON-DET.1-CABN.1-UA.ARMY.MIL-FCS-RS-V-2'/> </node> <node name='sv024_NODE_0'> <agent name='110-POL-SUPPLYCO.37-TRANSGP.21-TSC.ARMY.MIL'/> <agent name='123-MSB-FOOD.DISCOM.1-AD.ARMY.MIL'/> </node> <node name='sv007_NODE_0'> <agent name='1-35-ARBN.2-BDE.1-AD.ARMY.MIL'/> <agent name='1-6-INFBN.2-BDE.1-AD.ARMY.MIL'/> <agent name='1-AD.ARMY.MIL'/> </node> <node name='u133-utb_NODE_0'> <agent name='1-PLT-1-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='1-PLT-1-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL-FCS-ICV-0'/> <agent name='1-PLT-2-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> </node> <node name='acmev7_NODE_0'> <agent name='1-PLT-2-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL-FCS-ICV-0'/> <agent name='1-PLT-3-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='1-PLT-3-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL-FCS-ICV-0'/> </node> <node name='sb042_NODE_0'> <agent name='1-PLT-HQ.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='1-PLT-HQ.INFCO-A.1-CABN.1-UA.ARMY.MIL-FCS-ARV-A-0'/> <agent name='1-PLT-HQ.INFCO-A.1-CABN.1-UA.ARMY.MIL-FCS-C2V-0'/> </node> <node name='sv007-utb_NODE_0'> <agent name='1-PLT-WPN-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='1-PLT-WPN-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL-FCS-ICV-0'/> <agent name='1-PLT.INFCO-B.1-CABN.1-UA.ARMY.MIL'/> </node> <node name='sa007_NODE_0'> <agent name='1-PLT.MCSCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='1-PLT.MCSCO-A.1-CABN.1-UA.ARMY.MIL-FCS-ARV-R-0'/> <agent name='1-PLT.MCSCO-A.1-CABN.1-UA.ARMY.MIL-FCS-MCS-0'/> </node> <node name='sb007_NODE_0'> <agent name='1-PLT.MCSCO-A.1-CABN.1-UA.ARMY.MIL-FCS-MCS-1'/> <agent name='1-PLT.MCSCO-A.1-CABN.1-UA.ARMY.MIL-FCS-MCS-2'/> <agent name='1-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL'/> </node> <node name='sc007_NODE_0'> <agent name='1-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL-FTTS-MS-0'/> <agent name='1-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL-FTTS-MS-1'/> <agent name='1-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL-NLOS-Mortar-0'/> </node> <node name='sv008_NODE_0'> <agent name='1-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL-NLOS-Mortar-1'/> <agent name='1-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL-NLOS-Mortar-2'/> <agent name='1-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL-NLOS-Mortar-3'/> </node> <node name='sv022_NODE_0'> <agent name='1-PLT.RECON-DET.1-CABN.1-UA.ARMY.MIL'/> <agent name='1-PLT.RECON-DET.1-CABN.1-UA.ARMY.MIL-FCS-ARV-R-0'/> <agent name='1-PLT.RECON-DET.1-CABN.1-UA.ARMY.MIL-FCS-RS-V-0'/> </node> </host> <host name='sv025'> <facet uriname='sv025-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv025_NODE_0'> <agent name='123-MSB-HQ.DISCOM.1-AD.ARMY.MIL'/> <agent name='123-MSB-ORD.DISCOM.1-AD.ARMY.MIL'/> </node> </host> <host name='sv026'> <facet uriname='sv026-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv026_NODE_0'> <agent name='123-MSB-PARTS.DISCOM.1-AD.ARMY.MIL'/> <agent name='123-MSB-POL.DISCOM.1-AD.ARMY.MIL'/> </node> </host> <host name='sv027'> <facet uriname='sv027-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv027_NODE_0'> <agent name='125-ORDBN.7-CSG.5-CORPS.ARMY.MIL'/> <agent name='191-ORDBN.29-SPTGP.21-TSC.ARMY.MIL'/> </node> </host> <host name='sv028'> <facet uriname='sv028-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv028_NODE_0'> <agent name='2-BDE.1-AD.ARMY.MIL'/> <agent name='2-CA-BN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv029'> <facet uriname='sv029-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv029_NODE_0'> <agent name='2-PLT-1-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='2-PLT-2-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv030'> <facet uriname='sv030-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv030_NODE_0'> <agent name='2-PLT-3-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='2-PLT-HQ.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv031'> <facet uriname='sv031-utb'/> <facet service='acme'/> <facet service='nameserver'/> <facet group='02'/> <facet web='0'/> <node name='sv031_NODE_0'> <agent name='2-PLT-WPN-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='2-PLT.INFCO-B.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv032'> <facet uriname='sv032-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv032_NODE_0'> <agent name='2-PLT.MCSCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='2-PLT.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv033'> <facet uriname='sv033-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv033_NODE_0'> <agent name='2-PLT.RECON-DET.1-CABN.1-UA.ARMY.MIL'/> <agent name='200-MMC.21-TSC.ARMY.MIL'/> </node> </host> <host name='sv034'> <facet uriname='sv034-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv034_NODE_0'> <agent name='21-TSC-HQ.ARMY.MIL'/> <agent name='29-SPTGP.21-TSC.ARMY.MIL'/> </node> </host> <host name='sv035'> <facet uriname='sv035-utb'/> <facet service='acme'/> <facet service='Web0Gen'/> <facet group='02'/> <facet web='0'/> <node name='sv035_NODE_0'> <agent name='3-CA-BN.1-UA.ARMY.MIL'/> <agent name='3-PLT-1-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv036'> <facet uriname='sv036-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv036_NODE_0'> <agent name='3-PLT-2-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='3-PLT-3-INF-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv037'> <facet uriname='sv037-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv037_NODE_0'> <agent name='3-PLT-HQ.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='3-PLT-WPN-SQUAD.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv038'> <facet uriname='sv038-utb'/> <facet service='acme'/> <facet service='Web1Gen'/> <facet group='02'/> <facet web='0'/> <node name='sv038_NODE_0'> <agent name='3-PLT.INFCO-B.1-CABN.1-UA.ARMY.MIL'/> <agent name='3-PLT.MCSCO-A.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv039'> <facet uriname='sv039-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv039_NODE_0'> <agent name='3-PLT.RECON-DET.1-CABN.1-UA.ARMY.MIL'/> <agent name='3-SUPCOM-HQ.5-CORPS.ARMY.MIL'/> </node> </host> <host name='sv040'> <facet uriname='sv040-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> <node name='sv040_NODE_0'> <agent name='316-POL-SUPPLYBN.7-CSG.5-CORPS.ARMY.MIL'/> <agent name='343-SUPPLYCO.29-SPTGP.21-TSC.ARMY.MIL'/> </node> </host> <host name='sv041'> <facet uriname='sv041-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> <node name='sv041_NODE_0'> <agent name='37-TRANSGP.21-TSC.ARMY.MIL'/> <agent name='406-SUPPLYCO.7-CSG.5-CORPS.ARMY.MIL'/> </node> </host> <host name='sv042'> <facet uriname='sv042-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> <node name='sv042_NODE_0'> <agent name='47-FSB.DISCOM.1-AD.ARMY.MIL'/> <agent name='5-CORPS.ARMY.MIL'/> </node> </host> <host name='sv043'> <facet uriname='sv043-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> <node name='sv043_NODE_0'> <agent name='51-MAINTBN.29-SPTGP.21-TSC.ARMY.MIL'/> <agent name='561-SSBN.7-CSG.5-CORPS.ARMY.MIL'/> </node> </host> <host name='sv044'> <facet uriname='sv044-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> <node name='sv044_NODE_0'> <agent name='565-RPRPTCO.7-CSG.5-CORPS.ARMY.MIL'/> <agent name='6-TCBN.37-TRANSGP.21-TSC.ARMY.MIL'/> </node> </host> <host name='sv045'> <facet uriname='sv045-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> <node name='sv045_NODE_0'> <agent name='7-CSG.5-CORPS.ARMY.MIL'/> <agent name='71-MAINTBN.7-CSG.5-CORPS.ARMY.MIL'/> </node> </host> <host name='sv046'> <facet uriname='sv046-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> <node name='sv046_NODE_0'> <agent name='900-POL-SUPPLYCO.7-CSG.5-CORPS.ARMY.MIL'/> <agent name='AMC.TRANSCOM.MIL'/> </node> </host> <host name='sv047'> <facet uriname='sv047-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> <node name='sv047_NODE_0'> <agent name='AREA-SPT-EVAC-SECTION.FSB.1-UA.ARMY.MIL'/> <agent name='AREA-SPT-EVAC-SECTION.FSB.1-UA.ARMY.MIL-FTTS-AMB-0'/> </node> </host> <host name='sv048'> <facet uriname='sv048-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> <node name='sv048_NODE_0'> <agent name='AREA-SPT-EVAC-SECTION.FSB.1-UA.ARMY.MIL-FTTS-AMB-1'/> <agent name='AREA-SPT-EVAC-SECTION.FSB.1-UA.ARMY.MIL-FTTS-AMB-2'/> </node> </host> <host name='sv049'> <facet uriname='sv049-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> <node name='sv049_NODE_0'> <agent name='AREA-SPT-EVAC-SECTION.FSB.1-UA.ARMY.MIL-FTTS-AMB-3'/> <agent name='AVN-DET.1-UA.ARMY.MIL'/> </node> </host> <host name='sv050'> <facet uriname='sv050-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> <node name='sv050_NODE_0'> <agent name='AWR-2.21-TSC.ARMY.MIL'/> <agent name='BIC-CO.1-UA.ARMY.MIL'/> </node> </host> <host name='sv051'> <facet uriname='sv051-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> <node name='sv051_NODE_0'> <agent name='BN-HHB.NLOS-BN.1-UA.ARMY.MIL'/> <agent name='BN-HHC.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv052'> <facet uriname='sv052-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> <node name='sv052_NODE_0'> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL'/> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-FTTS-MS-0'/> </node> </host> <host name='sv053'> <facet uriname='sv053-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> <node name='sv053_NODE_0'> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-FTTS-MS-1'/> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-FTTS-MS-2'/> </node> </host> <host name='sv054'> <facet uriname='sv054-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> <node name='sv054_NODE_0'> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-FTTS-MS-3'/> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-FTTS-MS-4'/> </node> </host> <host name='sv055'> <facet uriname='sv055-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> <node name='sv055_NODE_0'> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-FTTS-MS-5'/> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-NLOS-Cannon-0'/> </node> </host> <host name='sv062'> <facet uriname='sv062-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> <node name='sv062_NODE_0'> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-NLOS-Cannon-1'/> <agent name='BTY-A-1-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL-NLOS-Cannon-2'/> </node> </host> <host name='sv063'> <facet uriname='sv063-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> <node name='sv063_NODE_0'> <agent name='BTY-A-2-CANNON-PLT.NLOS-BN.1-UA.ARMY.MIL'/> <agent name='BTY-A-HQ.NLOS-BN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv064'> <facet uriname='sv064-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> <node name='sv064_NODE_0'> <agent name='BTY-B.NLOS-BN.1-UA.ARMY.MIL'/> <agent name='BTY-C.NLOS-BN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv065'> <facet uriname='sv065-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> <node name='sv065_NODE_0'> <agent name='BTY-HQ.MORTAR-BTY.1-CABN.1-UA.ARMY.MIL'/> <agent name='CIC.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv066'> <facet uriname='sv066-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> <node name='sv066_NODE_0'> <agent name='CO-HQ.FSB.1-UA.ARMY.MIL'/> <agent name='CO-HQ.FSB.1-UA.ARMY.MIL-FTTS-MS-0'/> </node> </host> <host name='sv067'> <facet uriname='sv067-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> <node name='sv067_NODE_0'> <agent name='CO-HQ.FSB.1-UA.ARMY.MIL-FTTS-U-C2-0'/> <agent name='CO-HQ.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-0'/> </node> </host> <host name='sv068'> <facet uriname='sv068-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> <node name='sv068_NODE_0'> <agent name='CO-HQ.INFCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='CO-HQ.INFCO-B.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv069'> <facet uriname='sv069-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> <node name='sv069_NODE_0'> <agent name='CO-HQ.MCSCO-A.1-CABN.1-UA.ARMY.MIL'/> <agent name='CONUSGround.TRANSCOM.MIL'/> </node> </host> <host name='sv070'> <facet uriname='sv070-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> <node name='sv070_NODE_0'> <agent name='DET-HQ.RECON-DET.1-CABN.1-UA.ARMY.MIL'/> <agent name='DISCOM.1-AD.ARMY.MIL'/> </node> </host> <host name='sv071'> <facet uriname='sv071-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> <node name='sv071_NODE_0'> <agent name='DISTRO-MGT-CELL.FSB.1-UA.ARMY.MIL'/> <agent name='DISTRO-PLT-HQ.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv072'> <facet uriname='sv072-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> <node name='sv072_NODE_0'> <agent name='DLAHQ.MIL'/> <agent name='DRY-CARGO-SECTION.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv073'> <facet uriname='sv073-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> <node name='sv073_NODE_0'> <agent name='EVAC-PLT-HQ.FSB.1-UA.ARMY.MIL'/> <agent name='FUEL-WATER-SECTION.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv074'> <facet uriname='sv074-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> <node name='sv074_NODE_0'> <agent name='FWD-EVAC-SECTION.FSB.1-UA.ARMY.MIL'/> <agent name='HNS.MIL'/> </node> </host> <host name='sv075'> <facet uriname='sv075-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> <node name='sv075_NODE_0'> <agent name='HOLDING-DET.FSB.1-UA.ARMY.MIL'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv126'> <facet uriname='sv126-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> <node name='sv126_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-0'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-1'/> </node> </host> <host name='sv127'> <facet uriname='sv127-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> <node name='sv127_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-2'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-3'/> </node> </host> <host name='sv128'> <facet uriname='sv128-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> <node name='sv128_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-4'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-5'/> </node> </host> <host name='sv129'> <facet uriname='sv129-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> <node name='sv129_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-6'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-7'/> </node> </host> <host name='sv130'> <facet uriname='sv130-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> <node name='sv130_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-8'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FCS-RMV-9'/> </node> </host> <host name='sv131'> <facet uriname='sv131-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> <node name='sv131_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FTTS-MS-0'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FTTS-MS-1'/> </node> </host> <host name='sv132'> <facet uriname='sv132-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> <node name='sv132_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FTTS-MS-2'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FTTS-MS-3'/> </node> </host> <host name='sv133'> <facet uriname='sv133-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> <node name='sv133_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FTTS-MS-4'/> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FTTS-MS-5'/> </node> </host> <host name='sv134'> <facet uriname='sv134-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> <node name='sv134_NODE_0'> <agent name='MAINT-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-C2-0'/> <agent name='MCSCO-B.1-CABN.1-UA.ARMY.MIL'/> </node> </host> <host name='sv135'> <facet uriname='sv135-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> <node name='sv135_NODE_0'> <agent name='MED-CO-HQ.FSB.1-UA.ARMY.MIL'/> <agent name='MSC.TRANSCOM.MIL'/> </node> </host> <host name='sv158'> <facet uriname='sv158-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> <node name='sv158_NODE_0'> <agent name='OSC.MIL'/> <agent name='OSD.GOV'/> </node> </host> <host name='sv159'> <facet uriname='sv159-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> <node name='sv159_NODE_0'> <agent name='PlanePacker.TRANSCOM.MIL'/> <agent name='STAFF-CELL.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv160'> <facet uriname='sv160-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv160_NODE_0'> <agent name='SURG-PLT.FSB.1-UA.ARMY.MIL'/> <agent name='SURG-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-0'/> </node> </host> <host name='sv161'> <facet uriname='sv161-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv161_NODE_0'> <agent name='SURG-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-1'/> <agent name='SURG-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-2'/> </node> </host> <host name='sv162'> <facet uriname='sv162-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv162_NODE_0'> <agent name='SURG-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-3'/> <agent name='SURG-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-4'/> </node> </host> <host name='sv163'> <facet uriname='sv163-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv163_NODE_0'> <agent name='SURG-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-5'/> <agent name='SUSTAIN-CO-HQ.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv164'> <facet uriname='sv164-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> <node name='sv164_NODE_0'> <agent name='ShipPacker.TRANSCOM.MIL'/> <agent name='TRANSCOM-7.TRANSCOM.MIL'/> </node> </host> <host name='sv167'> <facet uriname='sv167-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> <node name='sv167_NODE_0'> <agent name='TREATMENT-PLT.FSB.1-UA.ARMY.MIL'/> <agent name='TREATMENT-PLT.FSB.1-UA.ARMY.MIL-FCS-MV-0'/> </node> </host> <host name='sv168'> <facet uriname='sv168-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> <node name='sv168_NODE_0'> <agent name='TREATMENT-PLT.FSB.1-UA.ARMY.MIL-FCS-MV-1'/> <agent name='TREATMENT-PLT.FSB.1-UA.ARMY.MIL-FCS-MV-2'/> </node> </host> <host name='sv169'> <facet uriname='sv169-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> <node name='sv169_NODE_0'> <agent name='TREATMENT-PLT.FSB.1-UA.ARMY.MIL-FTTS-MS-0'/> <agent name='TREATMENT-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-0'/> </node> </host> <host name='sv170'> <facet uriname='sv170-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> <node name='sv170_NODE_0'> <agent name='TREATMENT-PLT.FSB.1-UA.ARMY.MIL-FTTS-U-SPT-1'/> <agent name='TheaterGround.TRANSCOM.MIL'/> </node> </host> <host name='sv171'> <facet uriname='sv171-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> <node name='sv171_NODE_0'> <agent name='UA-HHC.1-UA.ARMY.MIL'/> <agent name='UAV-SUSTAIN-MAINT-SECTION.FSB.1-UA.ARMY.MIL'/> </node> </host> <host name='sv172'> <facet uriname='sv172-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> <node name='sv172_NODE_0'> <agent name='USAEUR.MIL'/> <agent name='USEUCOM.MIL'/> </node> </host> </society> --- NEW FILE: Host-with-webs.xml --- <?xml version='1.0'?> <society name='svcloudA-hosts'> <host name='sv007'> <facet service='cougaar-db'/> <facet service='smtp'/> </host> <host name='u133-utb'> <facet service='cnccalc-db'/> </host> <host name='acmev7'> <facet service='jabber'/> </host> <host name='sb042'> <facet service='analysis'/> </host> <host name='sv007-utb'> <facet service='nfs-shared'/> <facet service='nfs-software'/> <facet service='grabber-db'/> <facet service='smtp'/> </host> <host name='sa007'> <facet service='smtp'/> </host> <host name='sb007'> <facet service='smtp'/> </host> <host name='sc007'> <facet service='smtp'/> </host> <host name='sv008'> <facet service='smtp'/> </host> <host name='sv022'> <facet service='operator'/> </host> <host name='sv023'> <facet service='BW-router'/> </host> <host name='sv024'> <facet uriname='sv024-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv025'> <facet uriname='sv025-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv026'> <facet uriname='sv026-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv027'> <facet uriname='sv027-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv028'> <facet uriname='sv028-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv029'> <facet uriname='sv029-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv030'> <facet uriname='sv030-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv031'> <facet uriname='sv031-utb'/> <facet service='acme'/> <facet service='nameserver'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv032'> <facet uriname='sv032-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv033'> <facet uriname='sv033-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv034'> <facet uriname='sv034-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv035'> <facet uriname='sv035-utb'/> <facet service='acme'/> <facet service='Web0Gen'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv036'> <facet uriname='sv036-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv037'> <facet uriname='sv037-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv038'> <facet uriname='sv038-utb'/> <facet service='acme'/> <facet service='Web1Gen'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv039'> <facet uriname='sv039-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv040'> <facet uriname='sv040-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv041'> <facet uriname='sv041-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv042'> <facet uriname='sv042-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv043'> <facet uriname='sv043-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv044'> <facet uriname='sv044-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv045'> <facet uriname='sv045-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv046'> <facet uriname='sv046-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv047'> <facet uriname='sv047-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv048'> <facet uriname='sv048-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv049'> <facet uriname='sv049-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv050'> <facet uriname='sv050-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv051'> <facet uriname='sv051-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> </host> <host name='sv052'> <facet uriname='sv052-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> </host> <host name='sv053'> <facet uriname='sv053-utb'/> <facet service='acme'/> <facet group='11'/> <facet web='4'/> </host> <host name='sv054'> <facet uriname='sv054-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv055'> <facet uriname='sv055-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv062'> <facet uriname='sv062-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv063'> <facet uriname='sv063-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> </host> <host name='sv064'> <facet uriname='sv064-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> </host> <host name='sv065'> <facet uriname='sv065-utb'/> <facet service='acme'/> <facet group='13'/> <facet web='6'/> </host> <host name='sv066'> <facet uriname='sv066-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv067'> <facet uriname='sv067-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv068'> <facet uriname='sv068-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv069'> <facet uriname='sv069-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv070'> <facet uriname='sv070-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv071'> <facet uriname='sv071-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv072'> <facet uriname='sv072-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv073'> <facet uriname='sv073-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv074'> <facet uriname='sv074-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv075'> <facet uriname='sv075-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv126'> <facet uriname='sv126-utb'/> <facet service='acme'/> <facet group='21'/> <facet web='7'/> </host> <host name='sv127'> <facet uriname='sv127-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv128'> <facet uriname='sv128-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv129'> <facet uriname='sv129-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv130'> <facet uriname='sv130-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv131'> <facet uriname='sv131-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv132'> <facet uriname='sv132-utb'/> <facet service='acme'/> <facet group='22'/> <facet web='8'/> </host> <host name='sv133'> <facet uriname='sv133-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv134'> <facet uriname='sv134-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv135'> <facet uriname='sv135-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv158'> <facet uriname='sv158-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv159'> <facet uriname='sv159-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> <host name='sv160'> <facet uriname='sv160-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv161'> <facet uriname='sv161-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv162'> <facet uriname='sv162-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv163'> <facet uriname='sv163-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv164'> <facet uriname='sv164-utb'/> <facet service='acme'/> <facet group='02'/> <facet web='0'/> </host> <host name='sv167'> <facet uriname='sv167-utb'/> <facet service='acme'/> <facet group='03'/> <facet web='1'/> </host> <host name='sv168'> <facet uriname='sv168-utb'/> <facet service='acme'/> <facet group='04'/> <facet web='10'/> </host> <host name='sv169'> <facet uriname='sv169-utb'/> <facet service='acme'/> <facet group='10'/> <facet web='3'/> </host> <host name='sv170'> <facet uriname='sv170-utb'/> <facet service='acme'/> <facet group='12'/> <facet web='5'/> </host> <host name='sv171'> <facet uriname='sv171-utb'/> <facet service='acme'/> <facet group='20'/> <facet web='2'/> </host> <host name='sv172'> <facet uriname='sv172-utb'/> <facet service='acme'/> <facet group='23'/> <facet web='9'/> </host> </society> |
From: Dana M. <dan...@us...> - 2004-08-25 21:03:28
|
Update of /cvsroot/pydev/awb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772/docs Added Files: Using-CECOM-AgentView V0.1.ppt Log Message: wholesale commit --- NEW FILE: Using-CECOM-AgentView V0.1.ppt --- (This appears to be a binary file; contents omitted.) |
From: Dana M. <dan...@us...> - 2004-08-25 21:03:28
|
Update of /cvsroot/pydev/awb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30772 Added Files: ChangeLog README.txt ReleaseNotes __init__.py tasks-PlannerAgent.xml tasks-PlannerAgent2.htm test.txt Log Message: wholesale commit --- NEW FILE: tasks-PlannerAgent.xml --- <?xml version="1.0" encoding="UTF-8"?> <RelayAdapter><class>class org.cougaar.community.RelayAdapter</class><content><changeType>4</changeType><class>class org.cougaar.community.manager.CommunityDescriptorImpl</class><community><attributes><all/><caseIgnored>false</caseIgnored><class>class javax.naming.directory.BasicAttributes</class><IDs/></attributes><class>class org.cougaar.community.CommunityImpl</class><entities><class>class java.util.ArrayList</class><empty>false</empty></entities><name>NSfFF</name></community><name>NSfFF</name><source><address>PlannerAgent2</address><class>class org.cougaar.core.mts.SimpleMessageAddress</class><primary>PlannerAgent2</primary></source><UID><class>class org.cougaar.core.util.UID</class><id>1090604032186</id><owner>PlannerAgent2</owner><UID>PlannerAgent2/1090604032186</UID></UID><whatChanged>UGVPlannerAgent</whatChanged></content><interestedAgents><empty>false</empty></interestedAgents><targets>[PlannerAgent, PlanAnalyzerAgent, PlannerAgent2, UGSPlannerAgent, UGVPlannerAgent]</targets><UID>PlannerAgent2/1090604032186</UID></RelayAdapter> --- NEW FILE: __init__.py --- # Name: __init__.py # Purpose: Make the top-level CSMARTer directory a Python package # # Author: ISAT (P. Gardella) # # RCS-ID: $Id: __init__.py,v 1.1 2004/08/25 21:03:16 dana_virtual Exp $ # <copyright> # Copyright 2002 BBN Technologies, LLC # under sponsorship of the Defense Advanced Research Projects Agency (DARPA). # # This program is free software; you can redistribute it and/or modify # it under the terms of the Cougaar Open Source License as published by # DARPA on the Cougaar Open Source Website (www.cougaar.org). # # THE COUGAAR SOFTWARE AND ANY DERIVATIVE SUPPLIED BY LICENSOR IS # PROVIDED 'AS IS' WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS OR # IMPLIED, INCLUDING (BUT NOT LIMITED TO) ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND WITHOUT # ANY WARRANTIES AS TO NON-INFRINGEMENT. IN NO EVENT SHALL COPYRIGHT # HOLDER BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE OF DATA OR PROFITS, # TORTIOUS CONDUCT, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THE COUGAAR SOFTWARE. # </copyright> # __all__ = [] --- NEW FILE: ChangeLog --- Target Release Date Change ------- --------- ------------------------------------------------------- 1.1 24 Sep 03 Added logging to a log file (CSMARTer.log) of results of rule transformation. 1.1 25 Sep 03 Restructured distribution directories, placing the ACMEPy dir under the CSMARTer dir. This streamlines the build and install process. 1.2 28 Oct 03 Fixed bug that was preventing the sorting of agent items in the society trees. Also fixed bug that was preventing the search function from working properly. 1.2 6 Nov 03 Changed the graphic depiction of excluded hosts, nodes, and agents from an 'x' in the label to white text on a red background. Also, fixed problem causing an infinite loop when distributing agents with a node excluded. Finally, fixed bug that was allowing old text elements to remain in a TreeItemLabel obj even after the society with which the label was associated had been closed. --- NEW FILE: ReleaseNotes --- Version Changes ------- ---------------------------------------------------------------- 1.0 Initial release. See README.txt for installation/usage info. 1.1 1. Added logging to a log file when applying rules. After applying rules, check CSMARTer\CSMARTer.log for status re- porting and error messages. Many of the same messages are logged to the log pane in the app, but log file adds provides persistence. Subsequent runs of the program overwrite the previous log file. 2. Distribution directory restructuring: now ACMEPy is a subdirectory of CSMARTer, rather than being a sibling. Transparent to users. 1.2 1. Fixed various bugs, but most significant changes were those enabling CSMARTer to run on Linux. Though Python and wxPython are platform-independent, Linux/GTK behaves differently from Windows in how widgets and controls respond and/or render themselves. Note that there is not a separate version of the CSMARTer software for Windows and Linux; rather, the same software now runs under both. --- NEW FILE: tasks-PlannerAgent2.htm --- <html><head> <title>PlannerAgent2/1090604032186 View</title></head> <body bgcolor="#f0f0f0"> <b><a href="http://fpga:8800/$PlannerAgent2/tasks?mode=4" target="tablesFrame">PlannerAgent2</a></b><br> UniqueObject<br><p><a href="http://fpga:8800/$PlannerAgent2/tasks?mode=11&uid=PlannerAgent2%2F1090604032186" target="xml_PlannerAgent2%2F1090604032186_page">Raw XML for PlannerAgent2/1090604032186</a> <br></p><hr><br><pre><pre><font color="green"><?xml version="1.0" encoding="UTF-8"?></font> <font color="green"><RelayAdapter></font> <font color="green"><class></font>class org.cougaar.community.RelayAdapter<font color="green"></class></font> <font color="green"><content></font> <font color="green"><changeType></font>4<font color="green"></changeType></font> <font color="green"><class></font>class org.cougaar.community.manager.CommunityDescriptorImpl<font color="green"></class></font> <font color="green"><community></font> <font color="green"><attributes></font> <font color="green"><all/></font> <font color="green"><caseIgnored></font>false<font color="green"></caseIgnored></font> <font color="green"><class></font>class javax.naming.directory.BasicAttributes<font color="green"></class></font> <font color="green"><IDs/></font> <font color="green"></attributes></font> <font color="green"><class></font>class org.cougaar.community.CommunityImpl<font color="green"></class></font> <font color="green"><entities></font> <font color="green"><class></font>class java.util.ArrayList<font color="green"></class></font> <font color="green"><empty></font>false<font color="green"></empty></font> <font color="green"></entities></font> <font color="green"><name></font>NSfFF<font color="green"></name></font> <font color="green"></community></font> <font color="green"><name></font>NSfFF<font color="green"></name></font> <font color="green"><source></font> <font color="green"><address></font>PlannerAgent2<font color="green"></address></font> <font color="green"><class></font>class org.cougaar.core.mts.SimpleMessageAddress<font color="green"></class></font> <font color="green"><primary></font>PlannerAgent2<font color="green"></primary></font> <font color="green"></source></font> <font color="green"><UID></font> <font color="green"><class></font>class org.cougaar.core.util.UID<font color="green"></class></font> <font color="green"><id></font>1090604032186<font color="green"></id></font> <font color="green"><owner></font>PlannerAgent2<font color="green"></owner></font> <font color="green"><UID></font>PlannerAgent2/1090604032186<font color="green"></UID></font> <font color="green"></UID></font> <font color="green"><whatChanged></font>UGVPlannerAgent<font color="green"></whatChanged></font> <font color="green"></content></font> <font color="green"><interestedAgents></font> <font color="green"><empty></font>false<font color="green"></empty></font> <font color="green"></interestedAgents></font> <font color="green"><targets></font>[PlannerAgent, PlanAnalyzerAgent, PlannerAgent2, UGSPlannerAgent, UGVPlannerAgent]<font color="green"></targets></font> <font color="green"><UID></font>PlannerAgent2/1090604032186<font color="green"></UID></font> <font color="green"></RelayAdapter></font> </pre> </pre><br><hr><br> </body></html> --- NEW FILE: test.txt --- --- NEW FILE: README.txt --- CSMARTer '03 Installation and Users' Manual Version 1.2 November 7, 2003 Part I. OVERVIEW CSMARTer 03 presents the following features to the user in a graphical interface: · Creation (from scratch) of Cougaar societies and associated attributes, such as facets, parameters, class, priority, insertion point, etc. · Display of Cougaar societies read from pre-existing XML files; · Viewing and editing of Cougaar societies, including drag-and-drop editing; · Finding and sorting Cougaar society entities · Extensive facility for adding, deleting, displaying, editing, copying, and pasting facets; · Saving of Cougaar societies as XML files; · Creation, display, and editing of society transformation rules in Python or Ruby; · Society transformation using Python or Ruby rules; · Layout of Cougaar agents from an agent list onto a set of hosts using several different allocation methodologies: o Manual (drag-and-drop) o Automatic - Even distribution - Distribution by specified number of agents per host - Distribution by facet - Distribution of agents with their associated nodes to a new set of hosts Part II. INSTALLATION 1. CSMARTer uses the following third party software: Python The Python language interpreter wxPython Libraries for creating a graphical user interface in Python 4Suite Python XML Parser Assistance in finding and installing these applications, where necessary, is provided below. 2. Getting and installing CSMARTer: a. CSMARTer zip file (Windows only): The best way to get CSMARTer is to download the CSMARTer zip file ("CSMARTer.zip") from Docushare (under UltraLog -> Software Downloads). Unzip this file into the subdirectory of your choice and the installation is complete. Note that no Python, wxPython, or 4Suite installation is required. b. CSMARTer Installer (Windows only): The next best way to get CSMARTer is to download the installer (CSMARTer-1.2.win32.exe) from Docushare (under UltraLog -> Software Downloads). After downloading, double-click on the installer file and it will install itself into your Python directory in the Lib/site-packages subdirectory. Note, however, that this option requires a pre-existing installation of Python, wxPython, and 4Suite (see paragraph 2.e, below). c. CSMARTer .tar file (Linux only): Download the file CSMARTer-1.2-linux.tar.gz from Docushare (under UltraLog -> Software Downloads) into the directory of your choice. Ensure this directory is in your PYTHONPATH environment variable. Unpack the tarball. Note that this option requires an existing installation of Python, wxPython, and 4Suite (see paragraph 2.f, below). d. CSMARTer code (Windows or Linux): If you need to have the latest CSMARTer source code, download the CVS repository from the TIC by entering: cvs -d :ext:you...@cv...:/cvs/commons/isat co csmart If you don't have cvs access, contact Tom Copeland (to...@in...). When checkout is complete, the CSMARTer application will be located at csmart/src/python. It contains the CSMARTer and ACMEPy directories. Note that this option requires an existing installation of Python, wxPython, and 4Suite (see paragraph 2.e or 2.f, below). The remainder of these instructions will use the term "CSMARTER_INSTALL_PATH" to point to the directory to which you installed or unzipped the application (i.e., the directory containing the CSMARTer subdirectory). e. Installing the prerequisite software (Windows): (1) Download and install the latest version of Python from: www.python.org (latest version as of this writing is 2.3). (2) Download and install the latest version of wxPython from: http://www.wxpython.org/download.php (latest version as of this writing is 2.4.2.4). (3) Download and install the Python XML parser from: http://4suite.org/docs/howto/Windows.xml Click the link to: ftp://ftp.4suite.org/pub/4Suite/ Then download: 4Suite-1.0a3.win32-py2.3.exe by double-clicking on it. Note that the file to download may change as new versions of Python and 4Suite are released. (4) Set PATH to include the python executable. (5) If running directly from CVS checked out code, set a PYTHONPATH environment variable to include the python site-packages directory and the csmart\src\python directory. For example, if Python is installed in C:\python23 and CSMARTER_INSTALL_PATH points to the csmart directory (checked out from the cvs repository at the TIC as explained above), then PYTHONPATH= C:\python23\site-packages;CSMARTER_INSTALL_PATH\src\python f. Installing the prerequisite software (Linux): (1) Red Hat Linux 8 ships with version 2.2.1 or 2.2.2 of Python, but download and installation of the latest version of Python is recommended. Go to: www.python.org (latest version as of this writing is 2.3.2). (Before installing a new version of Python, if you want to preserve the original distribution version, move the python executable "python" from /usr/bin to /usr/lib/python2.x.) The RPM binaries for Python 2.3.x only work with Red Hat 9, so if you are running Red Hat 9, download the RPM and install. If you are running an earlier version of Red Hat, you will have to download the source and build it yourself. To do this, download the Python source tarball for the latest version (the .tgz or .tar.bz2 file) to your home directory, unpack it, then run the following commands to compile and install: ./configure --prefix=/usr make make install This will install the Python executable to your /usr/bin directory and the rest of Python to your /usr/lib/python2.3 directory. (2) Download and install the latest version of wxPython from: http://www.wxpython.org/download.php (latest version as of this writing is 2.4.2.4). Click on the link for wxPythonGTK under "For Python 2.3". Download the binary RPM to your home directory, log in as root, and install the RPM with: rpm -i [RPM filename] This will install wxPython into your /usr/lib/python2.3/site-packages directory. (3) Download and install the Python XML parser from: http://4suite.org/docs/howto/UNIX.xml Click the link to: ftp://ftp.4suite.org/pub/4Suite/ Then download: 4Suite-1.0a3.tar.gz by double-clicking on it. Note that the file to download may change as new versions of Python and 4Suite are released. Follow the installation instructions provided on the 4Suite web page. This will install 4Suite in your /usr/lib/python2.3/site-packages directory. (4) Ensure PATH is set to include the Python executable (should already include /usr/bin). (5) Set an environment variable PYTHONPATH to include the python site-packages directory and your CSMARTER_INSTALL_PATH. For example, if Python is installed in /usr/lib/python2.3, then set PYTHONPATH= /usr/lib/python2.3/site-packages:CSMARTER_INSTALL_PATH Part III. STARTING CSMARTER 1. a. If CSMARTer was obtained via the CSMARTer.zip file (Part II, paragraph 2.a), execute cs03.exe to start CSMARTer. b. If CSMARTer was obtained via the installer (Part II, paragraph 2.b), Windows users can start CSMARTer by running the batch file, CSMARTer.bat, located in (Python dir)\Lib\site-packages\CSMARTer. c. Linux users who downloaded the .tar file should change directory to CSMARTER_INSTALL_PATH/CSMARTer and launch the program by entering: python CS03.py d. Users running from the CSMARTer source code checked out from CVS can start CSMARTer either by running the CSMARTer.bat file at CSMARTER_INSTALL_PATH/CSMARTer (Windows only) or by changing directory to their CSMARTER_INSTALL_PATH/CSMARTer and entering: python CS03.py Part IV. USING CSMARTER 1. Functionality Description The CSMARTer application window contains four tabbed panes: Overview, Rules, Society Editor, and Agent Laydown. a. Overview The Overview tabbed pane presents a page of text that simply provides an overview of each of the other tabbed panes. It is not intended to be a complete Help facility. Users should view this pane for a quick overview of CSMARTer. b. Rules The Rules tabbed pane allows the user to create, view, edit, and apply society transformation rules. The rules can be written in either Python or Ruby. Python rule files should be named with the file extension ".rul", while Ruby rules should use the extension "rule". (1) Creating a new rule Click the "Create New Rule" button. Begin typing the rule in the editor window. Start the rule by including a comment that describes the purpose of the rule. CSMARTer reads the first sentence of this comment (or the first line if it contains no periods) as a description of the rule, and places this description in the "Rule Description" text box when the rule is next opened in the Rules pane. Save the rule when done. KNOWN BUG: Once the rule has been saved, it will appear in the Rulebook pane. There is no way to get it out of the Rulebook pane without closing CSMARTer. WORKAROUND: Just ignore it. If you need to use it to transform a society, just use it as usual. If you open the rulebook into which the rule was saved, the new rule will appear twice in the Rulebook pane. This causes no problem beyond simple annoyance since use of either instance of the rule will give the proper result. (2) Opening an existing rule A "rulebook" is simply a directory containing rules. To open an existing rule, click the "Open RuleBook" button and navigate to the directory containing the rule(s) you wish to open. Select it, then click "OK". The rule files contained in that rulebook will appear in the CheckListBox in the Rules pane. To open the rule in the editor window, simply click on the rule name in the CheckListBox. Once a rule is opened, it can be replaced in the editor window with a different rule by clicking on that new rule's name in the CheckListBox. Multiple Rulebooks can be open concurrently. To close an open Rulebook, select View -> Close Rulebook from the menu bar. (3) Saving a rule To save a rule, simply click the "Save Rule" button at the bottom of the Rules pane, or select File -> Save Rule or File -> Save Rule As... from the menu bar. (4) Editing a rule Once a rule is opened in the Rules pane, it can be edited with most standard text editing commands. (5) Applying a rule To apply a rule to a society (i.e., to transform the society), open the rulebook(s) containing the rule(s) to be applied. Ensure the society to be transformed has been opened (i.e., the society's name is visible in the "Current Society" text box at the top of the Rules tabbed pane), then check the checkboxes next to each rule to be applied (any number of rules may be checked), then click the "Apply Rules" button. If the society to be transformed is not yet opened, open it by clicking the "Open Society" button at the bottom of the Rules pane. When the society is open, its name will appear in the Current Society text box. Then you may click on the "Apply Rules" button. An alternative method of opening the society is to click on the Society Editor tab and open the society in that tabbed pane, where it can be reviewed prior to transformation, then return to the Rules pane. The completion of the transformation can be determined by watching the log messages that appear in the log pane at the bottom of the CSMARTer window. Once the transformation is complete, its effect can be seen by switching to the Society Editor pane. Added or changed society entities will be highlighted in cyan. (6) Undoing a rule transformation When a society, has been transformed by the application of one or more rules, this transformation can be backed out by pressing the "Undo Transform" button. The society will revert to the state it was in prior to the application of the rule(s). It is important to note that ALL changes made to the society after the application of the rule(s) will be lost. A warning dialog box pops up when the "Undo Transform" button is pressed to ensure the user is aware of, and approves of, the effect of backing out the rule. (7) Deleting or renaming a rule Rules can be deleted by selecting the rule in the Rulebook window, then clicking on Edit -> Delete Rule in the menu bar. Similarly, rules can be renamed by selecting the rule in the Rulebook window, then clicking on Edit -> Rename Rule in the menu bar. c. Society Editor The Society Editor allows a user to create, view, and/or edit a complete society. Main society entities (society, hosts, nodes, agents, components, and arguments) are displayed in a hierarchical tree format. (1) Creating a society To create a society from scratch, right click in the blank Society Editor window and select Create Society from the popup menu. Enter a name into the dialog box for the society being created and press <Enter>. The society will appear as the root node of the society tree. Right-clicking on this society tree item produces a popup menu from which the user can add a host, delete the society, or rename the society. To add a host, choose the Add A Host menu item. Another dialog box appears that permits the user to create a host by entering the host name. When the host is added, it can be right-clicked to add a node or perform other operations. A similar process can be followed to add agents, components, and arguments. (2) Viewing/Editing a society Pre-existing societies can be displayed by reading them in from an XML file. Click the Open Society button and select the desired XML file from the File Chooser. If the society fails to display, check the log pane for error messages. If the XML file contains an error, CSMARTer will issue a Parse Error and the log message will indicate the nature of the problem. An alternate way to open a society in the Society Editor is available if the society of interest is already open in the Agent Laydown tabbed pane: click the "Get HNA Map" button and the same society opened in the HNA Map (right side) window of the Agent Laydown pane is opened in the Society Editor. However, whereas society entities below the agent level are not shown in the Agent Laydown pane (even when they exist), these entities ARE shown in the Society Editor. When the society is initially displayed, it is visible only down to the host level. To view entities below that, click on the plus sign ("+") next to the host of interest to view that host's children, or select View on the menu bar then Show Entire Society, Show All Nodes, Show All Agents, or Show All Components to expand the society tree to the desired level. The View menu can also be used to collapse the society tree to the desired level. When a society has been transformed by applying rules, the society entities affected by the rule appear highlighted in cyan. To aid in finding these highlighted entities, press the "Next Highlight" button. The tree display will expand and scroll to the next highlighted entity not already visible. Successive clicks of the "Next Highlight" button will reveal additional highlighted items until all are visible. At this point, the "Next Highlight" button will be disabled. To remove the highlighting from an item, simply click on it. KNOWN BUG: Once society items are changed by a rule and highlighted, each subsequent application of rules will cause the highlighting to reappear on the original items. WORKAROUND: Save the society, close it, and reopen it. Highlighting will be gone. To reduce clutter, only the main society entities are displayed in the society tree; related information (such as facets, class, parameters, priority, insertion point) are available by right-clicking on the entity of interest and selecting View/Edit Info from the popup menu. These associated data can also be edited by right-clicking on the data item to be edited and selecting the desired function from the popup menu. Right-clicking on an item in the View/Edit Info tree display gives the user the opportunity to delete or edit the item and to add another sibling (if the data element can have multiple values). Right-clicking on a parent item also allows the user to add a child item (unless it only takes a single value and that value is already present). IMPORTANT NOTE: If selecting View/Edit Info from a society entity's right- click popup menu does not produce the View/Edit Info display, there is probably a previously displayed View/Edit Info window that has not been closed. ONLY ONE VIEW/EDIT INFO WINDOW CAN BE OPEN AT A TIME. When a society is opened in the Society Editor, CSMARTer automatically creates a node agent for each node and attaches it to that node. Components associated with the node are attached as children of the node agent FOR DISPLAY ONLY; when the society is saved, the node agent does not appear in the XML file, while the components appear as child elements of the node in the XML file. An open society may be edited by right-clicking on an item of interest and selecting the desired function from the popup menu. Entities can be added, deleted, or renamed in this manner. Entities can be moved and/or copied by dragging and dropping. This operation also supports reordering of child entities. Other operations available in the Edit menu in the menu bar include: Sort: Select a society entity, then click on Edit -> Sort to sort the child items under the selected entity alphabetically. Find/Find Next: Enter a string of text and any society entity name containing this string will be made visible and highlighted in blue. Change Nameserver: The society nameserver appears as a parameter on each node. This function changes the host that is to act as the nameserver. Note that the default nameserver is the first host listed in the society. KNOWN BUG: If, after changing the nameserver, the society is saved then reopened, the new nameserver is forgotten. WORKAROUND: Change the nameserver each time the society file is opened. (3) Closing/Saving a society When the user is through with a society, it may be either closed or saved. To close, click the Close Society button. If the society has changed, the user will be prompted to save it; otherwise, the society tree display will be cleared. To save the society, click the Save Society button to save the society as an XML file with the same name as the file originally opened (overwriting the original file), or select File -> Save Society As to save it as a separate file with a new name. The functionality of the Save Society button is duplicated by the File -> Save Society menu item. d. Agent Laydown The purpose of the Agent Laydown tabbed pane is to allow agents to be distributed from a list of agents to individual nodes and hosts. This pane is more complicated than the others, but also provides more functionality. The concept of operations is that a one-host, one-node society with many agents (an "agent list") is opened in the left window while a society with multiple hosts (and possibly nodes, but no agents) is opened in the right window. The user then maps agents to nodes, resulting in a "Host-Node-Agent (HNA) Map". This mapping may be done automatically by CSMARTer or manually by the user through drag and drop. The major features of the Agent Laydown pane are described below. (1) Create/Open an Agent List An agent list may be created from scratch by right-clicking inside a blank Agent List window and selecting Create Society. The process is identical to that described in section c (Society Editor). To open an existing agent list society, click the Open Agent List button on the left side and select an XML file to open from the File Chooser. (2) Create/Open an HNA Map There are several ways to obtain an HNA Map society. First is to create it manually by right clicking in an empty HNA Map window and selecting Create Society, then manually creating the necessary hosts by right clicking on the society item and selecting Create Host from the popup menu. Second is to click the Open HNA Map button and open an existing society XML file. Finally, a new society can be created quickly by clicking the Build HNA Map button in the center (between the two windows), which produces the Create New HNA Map dialog box. Enter a society name (optional; CSMARTer will create a default name if this text box is left blank), then enter the number of hosts to create. The host names are constructed by CSMARTer by concatenating the string in the Prefix text box with a sequence string. Specify the starting value of the sequence string in the Sequence Begins At text box; when CSMARTer creates the designated number of hosts, it will use this starting value in the name of the first host, then increment the the sequence value by one for each subsequent host. The starting value may be either one or more numbers or one or more letters. Repeat this process for node creation. If creation of only hosts is desired, check the "Do not create nodes" checkbox. Conversely, if only nodes are desired, check the "Do not create hosts" checkbox. CSMARTer will provide a default arrangement of the nodes on the available hosts, and will create a default host if nodes but no hosts are created. As an example of the flexibility of this process, the user can create 20 hosts, then 10 nodes with one prefix, then repeat the process by checking "Do not create hosts" and creating 10 more nodes with a different prefix (and starting sequence value, if desired). CSMARTer will place the first ten nodes on the first ten hosts, and the second ten nodes on the second ten hosts. (3) Distribute agents Agents from the agent list can be distributed to the HNA Map (the "mapped society") either manually by drag and drop or automatically by CSMARTer. The manual method is self-explanatory and will not be discussed further. There are currently three automatic distribution methods: (1) distributing agents evenly across the hosts in the mapped society; (2) by specifying the number of agents to be mapped to each host; and (3) by distributing agents or nodes based on facets. The selection of one of these three options is made by selecting one of the radio buttons in the center of the Agent Laydown pane. If "Distribute evenly" is selected, the agents are distributed evenly among the hosts in the HNA Map. If a host contains multiple nodes, the agents are also distributed evenly across the nodes within that host, but the number of agents allocated to that host is not affected by the number of nodes on the host. If "Specify number per host" is selected, an initial number of agents per host must be specified (though CSMARTer provides a suggested default value). Also, the number of nodes to place on each host is selectable (default is 1). (default is 1). If more than one node is specified per host, then the agents allocated to that host are evenly distributed across the nodes. If the agent list already contains nodes, checking the "Include Nodes from Agent List" checkbox will bring the nodes (with their agents) from the agent list to the HNA Map, distributing them evenly across the available hosts. To maintain the same node-to-host mapping, select the "Maintain same distribution" radio button. If the "Distribute by facet" radio button is selected, the user can distribute agents either (1) selected from the Agent List or (2) agents specified by the type and value of one or more of their facets. The destination to which these agents will be distributed can be specified either by specific host or node name or by a set of host or node facets. If the "Include Nodes from Agent List" checkbox is checked, then nodes can be distributed rather than agents. When multiple facets are chosen as selection criteria, the user can designate whether the facets are to be combined using "AND" boolean logic or "OR" logic. When all the option selections are made, click the Distribute Agents button (it will be labelled "Distribute Nodes" if the "Include Nodes from Agent List" checkbox is checked). Note that when distribution of nodes is included, any facets present on the hosts in the agent list are automatically transferred to the hosts in the HNA Map. To prevent this facet transfer, check the "Ignore Host Facets" checkbox. If the "Distribute by facet" radio button was selected, clicking the "Distribute Agents" (or "Distribute Nodes") button opens a dialog box that permits the user to make the selections necessary to perform the operations described in the previous paragraph. Once the distribution is complete, if the result is unsatisfactory, the operation may be reversed by clicking on Edit -> Undo in the menu bar. Additional functionality related to agent distribution includes: (a) Exclude Node/Agent from distro: Occasionally, it may be desirable to distribute all agents and/or nodes in the agent list except for certain nodes and/or agents. Similarly, it may not be desirable to distribute nodes and/or agents to every host and/or node in the HNA Map. For example, if a certain host in the HNA Map has already had nodes and agents allocated to it manually (via drag and drop) and the user desires to complete the remainder of the distribution using CSMARTer's automatic distribution feature without allocating still more nodes/agents to that host, it can be excluded from receiving additional nodes/agents. This is accomplished by right clicking on the entity to be excluded (nodes or agents in the agent list, hosts or nodes in the HNA Map), and selecting "Exclude [host | node | agent] from distro" from the popup menu. Excluded hosts, nodes, or agents are highlighted in red. (b) Once a distribution has been made, individual entities can be "unassigned" without undoing the entire distribution by right clicking on the entity to unassign and selecting "Unassign" from the popup menu. This operation removes the entity from the HNA Map and returns it to the agent list. If an entity is unassigned but there is no open society in the agent list window, a "temp society" is automatically created as a harness to hold the unassigned entity. (4) Working with facets Several capabilities are provided for working with facets. They are available by right-clicking on a society, host, node, or agent tree item and selecting the desired function from the popup menu. Show and Hide functions affect all entities of the same type as the selected entity. Other functions affect only the selected entity. Facet functions available on all entities: Show Specified Facets: Brings up a dialog box allowing the user to specify one or more existing facet types (with or without specific values) to display in the tree itself, immediately following the entity name. Show All Facets: Displays all available facets in the tree itself, immediately following the entity name. Facets appear in key=value format. Hide All Facets (only available when facets are shown): Removes the facets from the tree display (does not disassociate the facet from the entity). View/Edit Facets: Brings up a dialog box showing the facets on the selected entity. Allows users to add, delete, edit, or copy facets. Right clicking on an existing facet produces a popup menu containing add, delete, and copy options. Left-clicking a selected facet allows editing. If there are noexisting facets shown in the dialog box, right-clicking on the column header bar of the dialog box produces a popup menu allowing the user to add a facet. Add Facets: A more flexible way of adding facets than that provided by the Edit Facets function. Provides a dialog box with dropdown boxes containing likely facet types and values. Also permits adding the specified facet to the selected entity only or to all entities of the same type as the selected entity. Delete Facets: A more flexible way of deleting facets than that provided by the Edit Facets function. Provides a dialog box with dropdown boxes containing the existing facets on the selected entity. Also permits deleting the specified facet from the selected entity only or from all entities of the same type as the selected entity (where that facet exists). Facet functions available on Hosts and Nodes only: Copy Facets: Copies all facets on the selected entity and stores them on a clipboard, destroying the previous clipboard contents. Paste Facets: Pastes the facets on the clipboard into the selected entity. Pasting does not remove the facets from the clipboard. Facet functions available on Hosts only: Show Enclave Facet: Displays the value of the enclave facet in the tree itself, immediately following the host name. This display appears for every host. Show Service Facet: Displays the value of the service facet in the tree itself, immediately following the host name. This display appears for every host. Facet functions available on Nodes only: Show Role Facet: Displays the value of the role facet in the tree itself, immediately following the node name. This display appears for every node. (5) Viewing Summary Statistics on the Society The right-click popup menu for the Society and for Hosts con- tains a "View Society Summary" menu item. Selecting this item produces a dialog box containing the following information about the HNA Map society: - Society Name - Number of hosts, nodes, and agents - List of hosts with the number of nodes on each of those hosts (6) Deleting Society Entities The right-click popup menu for each entity contains a "Delete" menu item. If the selected entity is the Society or an Agent, delete destroys the entity. If the selected entity is the Society, the XML file is also deleted from the disk. Warning dialog boxes provide an opportunity to cancel the operation. If the selected entity is a Host or Node, the entity itself is destroyed, but its children (if any) are moved to the Agent List window. (7) Finding and Sorting Other operations available in the Edit menu in the menu bar include: Sort: Select a society entity, then click on Edit -> Sort to sort the child items alphabetically under the selected entity. Find/Find Next: Enter a string of text and any society entity name containing this string will be made visible and highlighted in blue. (8) Saving an Agent List The society displayed in the Agent List window CANNOT BE SAVED. It is intended as merely a "holding area" for agents (and sometimes nodes). Societies that a user desires to save should be created and/or edited in the HNA Map window. (9) Saving an HNA Map The society displayed in the HNA Map can be saved my clicking the Save HNA Map button above the HNA Map window. This button is a "Save As" button the first time the mapped society is saved in that it always gives the user a File Chooser dialog box and requires the input of a file name for the saved file. This is to prevent a user from inadvertently overwriting a society XML file with a partially-complete society. Subsequent saves after the first, however, are traditional in that the society is saved to the same file to which it was previously saved. A "Save As" of the HNA Map can be forced at any time by selecting the File -> Save HNA Map As item in the menu bar. 3. Logging CSMARTer has an automatic logging facility that logs to the file CSMARTer\CSMARTer.log. Currently, logging is restricted to: a. notice of a rule application, and b. the number of society entities that were modified by the rule. If a need arises for logging of other events and/or errors, contact the CSMARTer developer or enter a bug. |
From: Dana M. <dan...@us...> - 2004-08-25 21:00:23
|
Update of /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting/src/lib/cougaar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30593/cougaar Log Message: Directory /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting/src/lib/cougaar added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 21:00:04
|
Update of /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting/src/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30403/lib Log Message: Directory /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting/src/lib added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:59:48
|
Update of /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30352/src Log Message: Directory /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting/src added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:59:35
|
Update of /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30318/acme_scripting Log Message: Directory /cvsroot/pydev/awb/src/Python/ruleEngine/acme_scripting added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:58:14
|
Update of /cvsroot/pydev/awb/src/Python/bmp_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29910/bmp_source Log Message: Directory /cvsroot/pydev/awb/src/Python/bmp_source added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:58:14
|
Update of /cvsroot/pydev/awb/src/Python/Sample-Laydowns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29910/Sample-Laydowns Log Message: Directory /cvsroot/pydev/awb/src/Python/Sample-Laydowns added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:58:13
|
Update of /cvsroot/pydev/awb/src/Python/Sample-Rules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29910/Sample-Rules Log Message: Directory /cvsroot/pydev/awb/src/Python/Sample-Rules added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:58:12
|
Update of /cvsroot/pydev/awb/src/Python/ruleEngine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29910/ruleEngine Log Message: Directory /cvsroot/pydev/awb/src/Python/ruleEngine added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:58:12
|
Update of /cvsroot/pydev/awb/src/Python/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29910/data Log Message: Directory /cvsroot/pydev/awb/src/Python/data added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:58:11
|
Update of /cvsroot/pydev/awb/src/Python/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29910/util Log Message: Directory /cvsroot/pydev/awb/src/Python/util added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:58:08
|
Update of /cvsroot/pydev/awb/src/Python/bitmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29910/bitmaps Log Message: Directory /cvsroot/pydev/awb/src/Python/bitmaps added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:57:54
|
Update of /cvsroot/pydev/awb/src/Python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29860/Python Log Message: Directory /cvsroot/pydev/awb/src/Python added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:57:32
|
Update of /cvsroot/pydev/awb/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29771/docs Log Message: Directory /cvsroot/pydev/awb/docs added to the repository |
From: Dana M. <dan...@us...> - 2004-08-25 20:57:32
|
Update of /cvsroot/pydev/awb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29771/src Log Message: Directory /cvsroot/pydev/awb/src added to the repository |
From: Fabio Z. <fa...@us...> - 2004-08-25 17:26:17
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17377/src/org/python/pydev/editor Modified Files: PyEditConfiguration.java Log Message: Added code completion page. Index: PyEditConfiguration.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/PyEditConfiguration.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PyEditConfiguration.java 11 Aug 2004 17:40:20 -0000 1.17 --- PyEditConfiguration.java 25 Aug 2004 17:26:08 -0000 1.18 *************** *** 43,46 **** --- 43,47 ---- import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; + import org.python.pydev.editor.codecompletion.PyContentAssistant; import org.python.pydev.editor.codecompletion.PythonCompletionProcessor; import org.python.pydev.plugin.PydevPlugin; *************** *** 287,291 **** // create a content assistant: ! ContentAssistant assistant = new ContentAssistant(); // next create a content assistant processor to populate the completions window --- 288,292 ---- // create a content assistant: ! ContentAssistant assistant = new PyContentAssistant(); // next create a content assistant processor to populate the completions window *************** *** 297,303 **** assistant.setContentAssistProcessor(processor,IDocument.DEFAULT_CONTENT_TYPE ); assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer)); ! // Allow automatic activation after 500 msec ! assistant.enableAutoActivation(true); ! assistant.setAutoActivationDelay(250); Color bgColor = colorCache.getColor(new RGB(230,255,230)); assistant.setProposalSelectorBackground(bgColor); --- 298,304 ---- assistant.setContentAssistProcessor(processor,IDocument.DEFAULT_CONTENT_TYPE ); assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer)); ! ! //delay and auto activate set on PyContentAssistant constructor. ! Color bgColor = colorCache.getColor(new RGB(230,255,230)); assistant.setProposalSelectorBackground(bgColor); |