Create operation

This section provides a sample adapter request and response for the Create Message operation:

Create Message operation

The Create Message operation creates a new message.

The following table describes the <items> XML and request elements for the Create Message operation:

Adapter request elements for the Create Message operation

Element

Definition

Required

<username>

Specifies the user name for the HP Operations Manager server authentication

Note

If the <username> element is not specified, the adapter uses the user name specified in BMC Atrium Orchestrator Grid Manager.

No

<password>

Specifies the password that corresponds to the user name

Note

If the <password> element is not specified, the adapter uses the password specified in Grid Manager.

No

<arguments>

Specifies a list of arguments that are required for this operation

Yes

<title>

Specifies the message text

Yes

<dns-name>

Specifies the name of the node generating the message

Yes

<description>

Specifies a detailed description of the message

Valid value: Any string

No

<severity>

Specifies the severity of the message

Valid values:

  • Normal
  • Warning
  • Minor
  • Major
  • Critical
  • Unknown

No

<solution>

Specifies a description of the steps taken in response to the message

No

<category>

Specifies a string used for categorizing the message

Messages that have some logical connection fall under the same category or message group.

No

<sub-category>

Specifies the subcategory of the message used to further organize messages that have the same message group

No

<product-type>

Specifies the product type of the message

No

<problem-type>

Specifies the problem type of the message

No

<collaboration-mode>

Specifies the collaboration mode of the message

Valid values:

  • fyi (default)
  • peer
  • incident_exchange

No

<type>

Specifies the message type used for organizing messages.

No

<application>

Specifies the name of the application to which the message relates

No

<object>

Specifies the name of the object to which the message relates

No

<correlation-key>

Specifies a string that enables other processes to identify messages that relate to each other

No

<create-time>

Specifies the time at which the agent created the message

Valid values: DateTime in the format YYYY-MM-DDTHH:MM:SS Example: 2009-01-10T16:10:05

No

<custom-attributes>

Specifies the parent element of the <custom-attribute> element

No

<custom-attribute>

Specifies a custom message associated with the message; contains the <key> and <text> elements

No

<key>

Specifies a string that enables other processes to identify the custom attribute

No

<text>

Specifies the value of the custom attribute

No

The following figure shows a sample adapter request for the Create Message operation:

Sample adapter request for the Create Message operation

<hpom-request>
  <operation>create-message</operation>
  <username>user</username>
  <password>pass</password>
  <arguments>
    <title>Test Message Created using the Adapter</title>
    <dns-name>s-14686.synapse.com</dns-name>
    <description>Test_Message_Description</description>
    <severity>critical</severity>
    <solution>Test_Solution</solution>
    <category>Test_Category</category>
    <sub-category>test_sub_category</sub-category>
    <product-type>test_ProductType</product-type>
    <problem-type>test_ProblemType</problem-type>
    <collaboration-mode>peer</collaboration-mode>
    <type>message_type</type>
    <application>My custom app</application>
    <object>Test_Object</object>
    <correlation-key>test key</correlation-key>
    <creation-time>2009-08-26T05:10:00</creation-time>
    <custom-attributes>
      <custom-attribute>
        <key>custom_Attribute_1</key>
        <text>value_1</text>
      </custom-attribute>
    </custom-attributes>
  </arguments>
</hpom-request><hpom-request>
  <operation>create-message</operation>
  <username>user</username>
  <password>pass</password>
  <arguments>
    <title>Test Message Created using the Adapter</title>
    <dns-name>s-14686.synapse.com</dns-name>
    <description>Test_Message_Description</description>
    <severity>critical</severity>
    <solution>Test_Solution</solution>
    <category>Test_Category</category>
    <sub-category>test_sub_category</sub-category>
    <product-type>test_ProductType</product-type>
    <problem-type>test_ProblemType</problem-type>
    <collaboration-mode>peer</collaboration-mode>
    <type>message_type</type>
    <application>My custom app</application>
    <object>Test_Object</object>
    <correlation-key>test key</correlation-key>
    <creation-time>2009-08-26T05:10:00</creation-time>
    <custom-attributes>
      <custom-attribute>
        <key>custom_Attribute_1</key>
        <text>value_1</text>
      </custom-attribute>
    </custom-attributes>
  </arguments>
</hpom-request>

The following figure shows the adapter response for the sample request:

Sample adapter response for the Create Message operation

<hpom-response>
  <metadata>
    <status>success</status>
    <response-count>1</response-count>
  </metadata>
  <messages-response>
    <message-response>
      <metadata>
        <status>success</status>
        <count>1</count>
      </metadata>
      <Items>
        <Message>
          <AssignedOperator>
            <PersonAttributes>
              <Name />
            </PersonAttributes>
          </AssignedOperator>
          <MessageID>64972a0e-991b-71de-0676-ac1031690000</MessageID>
          <Title>Test Message Created using the Adapter</Title>
          <Description>Test_Message_Description</Description>
          <LifecycleState>open</LifecycleState>
          <Severity>Critical</Severity>
          <Solution>Test_Solution</Solution>
          <Category>Test_Category</Category>
          <SubCategory>test_sub_category</SubCategory>
          <ProductType>test_ProductType</ProductType>
          <ProblemType>test_ProblemType</ProblemType>
          <CollaborationMode>peer</CollaborationMode>
          <EmittingCI>
            <ConfigurationItemProperties>
              <ID />
            </ConfigurationItemProperties>
          </EmittingCI>
          <EmittingNode>
            <NodeProperties>
              <DnsName>s-14686.synapse.com</DnsName>
            </NodeProperties>
          </EmittingNode>
          <Extensions>
            <OperationsExtension>
              <Application>My custom app</Application>
              <Object>Test_Object</Object>
              <StateChangeTime>1970-01-01T05:30:00.000+05:30</StateChangeTime>
              <CreationTime>2009-08-26T05:10:00.000+05:30</CreationTime>
              <ReceivedTime>2009-09-04T11:52:59.000+05:30</ReceivedTime>
              <NumberOfDuplicates>0</NumberOfDuplicates>
              <CorrelationKey>test key</CorrelationKey>
              <ConditionMatched>false</ConditionMatched>
              <AutomaticActionStatus>notAvailable</AutomaticActionStatus>
              <OperatorActionStatus>notAvailable</OperatorActionStatus>
              <EscalationStatus>notEscalated</EscalationStatus>
              <Source>j7979488</Source>
              <NumberOfAnnotations>0</NumberOfAnnotations>
              <OriginalEvent />
              <CustomAttributes>
                <CustomAttribute>
                  <Key>custom_Attribute_1</Key>
                  <Text>value_1</Text>
                </CustomAttribute>
              </CustomAttributes>
            </OperationsExtension>
          </Extensions>
        </Message>
      </Items>
    </message-response>
  </messages-response>
</hpom-response>
Was this page helpful? Yes No Submitting... Thank you

Comments