wiki:Software/eAM/aInventory

Version 1 (modified by seskar, 11 years ago) ( diff )

Table of Contents

    Inventory Aggregate Manager

    Inventory AM consist of a database with a database schema that can hold information for arbitrary type of resource and a set of services that are used to manage it

    Resources and Relationships

    Resources are physical entities in a testbed that are assumed to be named with fully qualified domain name (fqdn) (for resources that can have one) or with arbitrary string (for resources that are not IP addressable)and can have any number of attributes. Resource can be in relation with any other resource with, so far, 2 types of relationships:

    Type Relationship Description
    1 belong_to The subject resource belongs to the object resource
    2 installed_in The subject resource is installed in the object resource

    Typically, type 1 is used to designate that the node belongs to a testbed, and type 2 for devices that are installed into a node (at the moment type of relationship is not used for any particular function by the inventory).

    To facilitate better classification, inventory services are using string based resource type. So far, defined resources types are: testbed, node and device (these types are only used by other services).

    Attributes

    Attributes are name-value pairs of strings. Attribute names are prefixed to support globbing.

    Attribute prefixes:

    • CM_ - Attributes used by the CMC AM ( CM_TYPE, CM_IP, CM_PORT, CM_USER_NAME, CM_PASSWORD )
    • INF_ - Core infrastructure attributes used by the PXE and Frisbee service ( INF_CONTROL_IP )
    • INV_ - Attributes gathered by the inventory process

    Inventory Service Group

    <services>
      <serviceGroup prefix="/inventory" name="inventory">
        <info></info>
        <service name="attribute_add"></service>
        <service name="attribute_delete"></service>
        <service name="attribute_list"></service>
        <service name="attribute_listChildren"></service>
        <service name="attribute_modify">
        <service name="relation_add"></service>
        <service name="resource_add"></service>
        <service name="resource_delete"></service>
        <service name="resource_list"></service>
        <service name="topology_add"></service>
        <service name="topology_delete"></service>
        <service name="topology_list"></service>
        <service name="topology_show"></service>
      </serviceGroup>
    </services>
    

    Resource Services

    <service name="resource_add">
      <info>Add resource</info>
      <args>
         <arg name="name" isRequired="true" value="name">
            <info>name of the resource or fully qualified resource name</info>
         </arg>
         <arg name="type" isRequired="true" value="type">
             <info>type of the resource</info>
         </arg>
         <arg name="xml" isRequired="false" value="[xml]">
            <info>xml-encoded hash of resource parameters</info>
         </arg>
      </args>
    </service>
    
    <service name="resource_delete">
      <info>Remove set of resources</info>
      <args>
        <arg name="set" isRequired="true" value="set">
           <info>set of resource names</info>
        </arg>
      </args>
    </service>
    
    <service name="resource_list">
      <info>Get all available resources of given type that belongs to given parent resource with all attributes</info>
      <args>
        <arg name="parent" isRequired="false" value="[parent]">
          <info>Fully qualified resource name</info>
        </arg>
        <arg name="type" isRequired="false" value="[type]">
          <info>Type name, currently suported testbed, node and device</info>
        </arg>
      </args>
    </service>
    
    <service name="relation_add">
      <info>Add relatin between two resources</info>
      <args>
        <arg name="parent" isRequired="true" value="rn">
          <info>parent resource name</info>
        </arg>
        <arg name="child" isRequired="true" value="rn">
          <info>child resource name</info>
        </arg>
      </args>
    </service>
    

    Usage Example

    Create tesbed, add node to it and add basic attributes

      
    

    Note: See TracWiki for help on using the wiki.