Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
class AgentExternal(Agent):
      <constructor>(name=<name-string>,
                    domain=(optional) domain string for agent's AMQP address,
                    notifier= class Notifier,
                    heartbeat_interval=30,
                    max_msg_size=65535)
      .alloc_object_id( name="object name"): indicate to QMF that the named object is available to be managed.  Once this method returns,
          the agent will service requests from consoles referencing this data.
      .free_object_id( name="object name" ): indicate to QMF that the named object is no longer available to be managed.
      .query_response( handle=<handle from WorkItem>,
                      class QmfAgentObject): send a managed object in reply to a received query. Note that ownership of the object
          instance is returned to the caller on return from this call.
      .query_complete( handle=<handle from WorkItem>,
                      result=<status code> ):  Indicate to the agent that the application has completed processing a query request.
          Zero or more calls to the queryResponse() method should be invoked before calling query_complete().  If the query should
          fail - for example, due to authentication error - the result should be set to a non-zero error code ?TBD?.

      .subscription_response( handle=<handle from WorkItem>,
                             console_handle=<handle provided by Console for this subscription>,
                             subscription_handle=<agent-provided context>,
                             expire_time=<datetime>lifetime=<seconds>, publish_interval=<seconds>,
                             error=<QmfData>): Indicate the result of a subscription request or subscription refreshSUBSCRIBE_REQUEST WorkItem.
          If replyingthe tosubscription arequest sucessfulis subscriptionsuccessful, the Agent application must provide a unique subscription_handle.  If replying
          to a sucessful subscription refresh, the original subscription_handle must be supplied.  expire_timeThe lifetime parameter should be
 set to
        set to the UTCduration timestamp whenof the subscription nextin expiresseconds.  IfThe thepublish_interval subscriptionshould orbe refreshset fails,to the subscription_handle
time interval in seconds
       should be set tobetween Nonesuccessive andpublications erroron maythis besubscription. set  If the subscription or refresh fails, the subscription_handle
          should be set to None and error may be set to an application-specific QmfData instance that describes the error.  Should
          a refresh request fail, the console_handle may be set to None if unknown.

      .subscription_indicationindicate(subscriptionconsole_handle, [list of subscribed data]): Send a list of updated subscribed data to the Console.

      .subscription_cancel(handle=<handle from WorkItem>, subscriptionconsole_handle): Acknowledge a Subscription Cancel WorkItem.

...

  • METHOD_CALL
  • QUERY
  • SUBSCRIBE_REQUEST
  • RESUBSCRIBE_REQUEST
  • UNSUBSCRIBE_REQUEST

Note Well: In the case of an internal store agent implementation, only the METHOD_CALL work item is generated. An external store agent must support all work item types.

...

The SUBSCRIBE_REQUEST WorkItem provides a query that the agent application should monitor must periodically publish until the subscription is cancelled or expires. On receipt of this WorkItem, the application should call the Agent::subscription_response() method to acknowledge the request. Whenever the matching objects are modifiedOn each publish interval, the application should call Agent::subscription_indicate() method for each updated
object, followed by a call to subscription_complete() when done, passing a list of the objects that satisfy the query. The subscription remains in effect until an UNSUBSCRIBE_REQUEST WorkItem for the subscription is received, or the subscription expires.

If this WorkItem is intended to refresh an existing subscription, the ::get_subscription_idThe get_params() method call will return the subscription handle provided by the Agent to the original subscription request.  If this WorkItem is intended to create a new subscription, then the ::get_subscription_id() will return None.

TBD.....

The METHOD_CALL WorkItem describes a method call that must be serviced by the application on behalf of this agent.

The get_params() method of a METHOD_CALL WorkItem will return of the SUBSCRIBE_REQUEST WorkItem returns an instance of the following object:

No Format
class MethodCallParamsSubscriptionParams:
      .get_console_namehandle(): returns athe stringhandle containingthat the console nameuses ofto theidentify methodthis callsubscription.
      .get_object_id(): returns the identifier forThis thehandle objectmust onbe whichpassed this
along with every published update from     method needs to be invoked.  Returns None iff there is no associatedthe Agent.
      .get_query(): returns the QmfQuery object (aassociated methodwith call against the agent itself)subscription.
      .get_argspublish_interval(): returns the arequested maptime ofinterval inputin argumentsseconds for theupdates. method. ArgumentsReturns
          arezero in "name"=<value> pairs.  Returns None if no arguments are suppliedif the Agent's default interval should be used.
      .get_user_idlifetime(): returns authenticated user id of caller the requested lifetime for the subscription.  Zero if present, else None.
the Agent's
          default subscription lifetime should be used.
      .get_user_id(): returns authenticated user id of Console if present, else None.

The Agent application must call the AgentExternal::subscriptionOn completion of the method call, the application must provide the result of the call to the Agent. This is done by invoking the Agent's method_response() method in response to this WorkItem.

The methodget_responsehandle() method must WorkItem method returns the reply handle which should be passed the handle from the METHOD_CALL WorkItem.

On successful completion of a method call, any output arguments from the method call must be passed in the out_args map parameter, in name=<value> pairs. The error parameter must be set to None.

If the method call fails the application must indicate the failure by passing a QmfData instance via the error parameter. The structure of this QmfData is application-specific, and meant to provide a description of the failure to the console.

UNSUBSCRIBE

No Format

  UNSUBSCRIBE parameters: ( <handle associated with subscription> )

to the Agent's subscription_response() method.

RESUBSCRIBE_REQUEST

The RESUBSCRIBE_REQUEST is sent by a Console to renew an existing subscription.  The Console may request a new duration for the subscription, otherwise the previous lifetime interval is repeated.

The get_params() method call of the RESUBSCRIBE_REQUEST WorkItem returns an instance of the following object:

No Format

class ResubscribeParams:
    .get_subscription_id(): returns the subscription identifier provided by the Agent.
    .get_lifetime(): returns the requested lifetime for the subscription.  Zero if the previous
        interval should be used.
    .get_user_id(): returns the authenticated user id of the Console if present, else None.

The Agent application must call the AgentExternal:subscription_reponse method in response to this WorkItem.

The get_handle() WorkItem method returns the reply handle which should be passed to the Agent's subscription_reponse() method

UNSUBSCRIBE_REQUEST

The UNSUBSCRIBE_REQUEST is sent by a Console to terminate an existing subscription.

The get_params() method call returns the subscription identifier assigned by the Agent when the subscription is created.

The Agent application should terminate the given subscription if it exists, and cancel sending any further updates against itTBD
Alerts the application that the corresponding subscription has been
cancelled. The application should no longer supply query updates
against the subscribed query.