Tags:
create new tag
, view all tags

Resrouce Descriptor

Overview

Resource Descriptor provides the extensibility to different applications. Resource Descriptor for each resource types includes:

  • res_type (required): indicate whether the resource is a node or link resource
  • subtype (required): under the board type of node and link, there were many different subtypes, i.e. telescope, computation node etc, subtype is used to further define the type of the resource
  • broker (optional): the resource broker that the resource should contact to
    • gather more details on a particular resource, or
    • search for a resource accordingly to the filled parameters in the user request
  • schema (optional): written in Relax NG format to define what AST_master should expect under for that resource type. This can be either a local file or a file on the web.
  • default_values (optional): as XML file indicates the default values for the attributes in the resource type if AST_master doesn't set those attributes after contacting the resource broker
  • agent (required): indicate how AST_master should contact the minion for the resource type.

Basically, resource is the central theme of AST; provisioning, managing and monitoring resources are the major duties for AST. Resource descriptor is mainly for the sake for the AST_master to understand different types of resources. However, resource broker and minions can also extended their knowledge of resources by reading in resource descriptors so that all components in AST can be guaranteed a unified view of resources. More details should be found under developer page.

Resource Definition

At startup, AST_master will read the resource definition file at "/usr/local/ast_file/res_def.xml". This file will contains block(s) of resource descriptor in the following format

<resource_definition>
    <resource ...>
    ...
    </resource>
    <resource ...>
    ...
    </resource>
</resource_definition>

Current Applications and their related resources

There are potential infinite number of applications that AST can support. The Application page under DRAGON project page lists some of the applications that we construct use cases from.

dragon_app

Dragon_app consists of resources that have properties useful to build a topology over a DRAGON network. Thus, strictly speaking, dragon_app is not an application that we would construct our use cases from. However, it's a good model to build the concept of AST because we can use dragon_app to run a variety of applications over the DRAGON network.

Currently, we have added the "dragon_app" in the deployment of the AST code. It also serves as an example to illustrate how to add an application to AST. Please refers to the developer page for further instruction to add your own resources and run AST for your application.

Node resource: dragon_node_pc

<resource res_type="node" subtype="dragon_node_pc">
    <schema>/usr/local/ast_file/xml_schema/dragon_node_pc.rng</schema>
    <agent port="2623"></agent>
</resource>

The block indicates that dragon_node_pc is a node resource. Its schema could be found at /usr/local/ast_file/xml_schema/dragon_node_pc.rng and AST_master should contact the minion for dragon_node_pc at port 2623 on the provided for the dragon_node_pc.

Its schema looks like


<element name="res_details" xmlns="http://relaxng.org/ns/structure/1.0">
  <interleave>
    <optional><element name="router_id"><text/></element></optional>
    <optional><element name="tunnel"><text/></element></optional>
    <optional><element name="command"><text/></element></optional>
    <zeroOrMore>
      <element name="ifaces">
        <interleave>
        <optional><element name="iface"><text/></element></optional>
        <optional><element name="assign_ip"><text/></element></optional>
        <optional><element name="vtag"><text/></element></optional>
        </interleave>
      </element>
    </zeroOrMore>
  </interleave>
</element>

Note that if AST_master doesn't need to understand attributes under "res_details" for dragon_node_pc, the developer doesn't need to define the schema as the above example. When AST_master encounters any resource that it doesn't have a schema file to validate against it, AST_master will simply let the resource pass validation.

Link resource: dragon_link

<resource res_type="link" subtype="dragon_link">
    <schema>/usr/local/ast_file/xml_schema/dragon_link.rng</schema>
    <agent port="2618"></agent>
</resource>

This is a link resource, dragon_link.

Its schema looks like

<element name="res_details" xmlns="http://relaxng.org/ns/structure/1.0">
  <optional>
  <attribute name="dragon_type">
    <choice>
      <value>uni</value>
      <value>vlsr_vlsr</value>
      <value>non_uni</value>
    </choice>
  </attribute>
  </optional>
  <interleave>
    <optional><element name="link_status"><text/></element></optional>
    <optional><element name="lsp_name"><text/></element></optional>
    <optional><element name="src">
      <element name="node"><text/></element>
      <optional><element name="local_id"><text/></element></optional>
      <optional><element name="iface"><text/></element></optional>
      <optional><element name="assign_ip"><text/></element></optional>
    </element></optional>
    <optional><element name="dest">
      <element name="node"><text/></element>
      <optional><element name="local_id"><text/></element></optional>
      <optional><element name="iface"><text/></element></optional>
      <optional><element name="assign_ip"><text/></element></optional>
    </element></optional>
    <element name="te_params">
          <optional><attribute name="profile"><text/></attribute></optional>
          <interleave>
          <optional><element name="bandwidth">
            <choice>
              <value>gige</value><value>gige_f</value><value>2gige</value>
              <value>3gige</value><value>4gige</value><value>5gige</value>
              <value>6gige</value><value>7gige</value><value>8gige</value>
              <value>9gige</value><value>eth100M</value><value>eth150M</value>
              <value>eth200M</value><value>eth300M</value><value>eth400M</value>
              <value>eth500M</value><value>eth600M</value><value>eth700M</value>
              <value>eth800M</value><value>eth900M</value><value>10g</value>
              <value>hdtv</value><value>oc48</value>
            </choice>
          </element></optional>
          <optional><element name="swcap">
            <choice>
              <value>psc1</value><value>l2sc</value>
              <value>lsc</value><value>tdm</value>
            </choice>
          </element></optional>
          <optional><element name="encoding">
            <choice>
              <value>packet</value><value>ethernet</value>
              <value>lambda</value><value>sdh</value>
            </choice>
          </element></optional>
          <optional><element name="gpid">
            <choice>
              <value>ethernet</value><value>lambda</value><value>sdh</value>
            </choice>
          </element></optional>
          <optional><element name="vtag"><text/></element></optional>
          </interleave>
    </element>
  </interleave>
</element>
Topic revision: r8 - 2014-04-07 - XiYang
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback