UNSOLVED

BenimusIQ

updated

12 years ago

B

BenimusIQ

12 Posts

0

1537

May 21st, 2014 17:00

Setting a value in UDF using EDAA

Hello,

I am trying to use the new EMC Data Access API to perform some integration tasks between EMC Smarts and an ITSM tool. We have the API up and running and can perform actions related to acknowledgements, ownership, query relationships, etc. etc., however one of the tasks that we want to perform is to update one of the UserDefined fields to contain a ticket number from the ITSM system using this API.

We can see in the API docs that there is an action you can perform on an event called "updateUDField", however we have not been able to get this to work. Our understanding is that an HTTP POST to the resource/action/updateUDField with the appropriate content in the payload should update the field, however the API docs don't explain what the paylod should look like.

These should be analogous to the dmctl invoke commands, however we have never used this action via dmctl either, so we don't know what the content there should look like either.

dmctl> geto ICS_Notification | grep updateUDField

  updateUDField value

Has anyone tried to do this action via the API, and if so can you share what the xml-like payload looks like?

Thanks

-Ben

  • PaulORourke

    170 Posts

    679

    0

    Posted May 29th, 2014 02:00

    Hi BenimusIQ,

    When using dmctl, the easiest method of updating a UserDefined field is to use the PUT option:

    ./dmctl -s INCHARGE-SA put ICS_Notification::NOTIFICATION-TestClass_TestDevice_TestEvent::UserDefined1 "My String"

    The EMC Data Access API (EDAA) request has the following basic syntax to access or perform an action on a resource:

      [payload]

    HTTP_method options:

    • GET - List the members or representation of the resource
    • PUT - Replace the collection or representation of the resource
    • POST - Create a new resource
    • DELETE - Delete the resource or collection

    Therefore, I believe you should be able to update a UserDefined field as follows:

    PUT https:// /msa20-dmt/msa/ /instances/ICS_Notification:: ::UserDefined1 "My String"

    where: is the name assigned when the EDAA was configured, is the notification instance you wish to update and "My String" is the value you wish to place in the UserDefined1 field.

    Thanks,

    Kind Regards,

    Paul O'Rourke

  • BenimusIQ

    12 Posts

    677

    0

    Posted June 2nd, 2014 22:00

    Hi Paul,

    Thanks for the info, but unfortunately that didn't work. Steps I took are as follows:

    curl -H Content-Type:text/xml -X PUT -w %{http_code} -d @udf12.html http:// :8080/msa20-dmt/msa/SAM/instances/ICS_Notification::NOTIFICATION-Integration_TestServer-Blackout_UpdateUDF12::UserDefined12

    Content of udf12.html:

    CHG0123456

    http://www.w3.org/2005/Atom " xmlns:vsc=" http://schemas.emc.com/vs-xml/namespace/Common/1.0 ">

      /msa20-dmt/msa/SAM/instances/ICS_Notification::NOTIFICATION-Integration_TestServer-Blackout_UpdateUDF12::UserDefined12

      2014-06-02T10:20:46+10:00

     

        EDAA Feed

     

      e42a2c51-09ae-4818-80d5-c2e15a34b9ad

      MsaError - Msa Internal Server Error. Reason: NOT IMPLEMENTED. Caused by: Internal MSA error

      http:// :8080/msa20-dmt/msa/SAM/instances/MsaError::4021

      2014-06-02T10:20:46+10:00

      http://schemas.emc.com/msa/common/reln/type " href=" http:// :8080/msa20-dmt/msa/SAM/types/MsaError "/>

      http://schemas.emc.com/vs-xml/namespace/Common/1.0 " xmlns:vsc=" http://schemas.emc.com/vs-xml/namespace/Common/1.0 ">

        Msa Internal Server Error. Reason: NOT IMPLEMENTED. Caused by: Internal MSA error

        4021

        msa.internal.server.error

        Msa Internal Server Error. Reason: NOT IMPLEMENTED. Caused by: Internal MSA error

        http:// :8080/msa20-dmt/msa/SAM/instances/ICS_Notification::NOTIFICATION-Integration_TestServer-Blackout_UpdateUDF12::UserDefined12

        2014-06-02T10:20:46+10:00

        OPERATION_ERROR

        http://schemas.emc.com/msa/common/reln/type " href=" http:// :8080/msa20-dmt/msa/SAM/types/MsaError "/>

     

    HTTP 500

    The content of udf12.html that I posted above aligns with other actions we are performing using the EDAA, however as you can see we are getting a method not implemented message back rather than something like an XML parsing error, so it seems to like the content and the reference, but doesn't do anything with it...

    -Ben

  • hhe

    13 Posts

    677

    0

    Posted September 18th, 2014 16:00

    I didn't have experience with EDAA before, but normally if you use dmctl to update a UDF of a notification instance, you need to invoke a change() on that notification instance, not sure if there is a similar action you can call via the EDAA.

    You can let us know how you go, I am sure this can be resolved.