DX NetOps

  • 1.  Delete Custom Attributes

    Posted Oct 25, 2017 12:15 PM

    Good afternoon!
    I would like to know if anyone has found any way to delete CAPC custom attributes?

    In the Documentation, it mentions that after the created attribute it is not possible to delete!

     

     

    Create Custom Attributes - CA Performance Management - 3.0 - CA Technologies Documentation 



  • 2.  Re: Delete Custom Attributes

    Broadcom Employee
    Posted Oct 25, 2017 04:47 PM

    Robson,

     

    I confirmed in the latest docs that it remains the same, once created it can not be deleted.

     

    There is a limit to the number that can be created. As a result care and caution should be excercised when creating custom attributes.

     

    Maybe someone from the user community can assist with a solution outside of supported means.

     

    Thanks,

    Mike



  • 3.  Re: Delete Custom Attributes

    Posted Oct 26, 2017 10:41 AM

    I haven't seen where you can delete the attribute field but if you make it generic enough, you can always change the label and description. Something I recently did was create something like the following.

     

    AttributeNames      Label            Description

    DeviceAttrString1   City Code      City Code

    DeviceAttrInt1         Future Use   Future Use

    PortAttrString1         City Code    City Code

    PortAttrInt1               Upgrade Status

     

    This allows you to change the Label and Description later if needed without affecting the AttributeNames which can't be changed / removed.



  • 4.  Re: Delete Custom Attributes

    Posted Oct 27, 2017 09:55 AM

    I found it interesting, thanks for the help!
    Is it that you have the script of how you performed, you can make it available?

    so I understand you added a few more lines inside the script?



  • 5.  Re: Delete Custom Attributes
    Best Answer

    Posted Oct 27, 2017 11:36 AM

    You need to have curl installed for these commands to work or you could use a REST client.

    I didn't make a script because these only need to be run once to create the fields. Change the label and descriptions as needed before using.

     

    Devices Strings

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>City Code</Label><Description>City Code</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrString1</AttributeName><Type>String</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>Location Type</Label><Description>Location Type</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrString2</AttributeName><Type>String</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>non-proprietary</Label><Description>non-proprietary</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrString3</AttributeName><Type>String</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>DeviceString4 Future</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrString4</AttributeName><Type>String</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>DeviceString5 Future</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrString5</AttributeName><Type>String</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    Devices Integers

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>DeviceInt 1</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrInt1</AttributeName><Type>Integer</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>DeviceInt 2</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrInt2</AttributeName><Type>Integer</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>DeviceInt 3</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrInt3</AttributeName><Type>Integer</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>DeviceInt 4</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrInt4</AttributeName><Type>Integer</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>DeviceInt 5</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>DeviceAttrInt5</AttributeName><Type>Integer</Type><ItemType>Device</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    Interface Strings

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>City Code</Label><Description>City Code</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrString1</AttributeName><Type>String</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>Location Type</Label><Description>Location Type</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrString2</AttributeName><Type>String</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>non-proprietary</Label><Description>non-proprietary</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrString3</AttributeName><Type>String</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>Provider</Label><Description>Provider</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrString4</AttributeName><Type>String</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>PortString5</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrString5</AttributeName><Type>String</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition


    Interface Integers

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>Upgrade Status</Label><Description>0 No Status; 1 Identified for Upgrade; 2 Circuits ordered and or actively being worked</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrInt1</AttributeName><Type>Integer</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>Report Inclusion</Label><Description>Report Inclusion</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrInt2</AttributeName><Type>Integer</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>PortInt 3</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrInt3</AttributeName><Type>Integer</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>PortInt 4</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrInt4</AttributeName><Type>Integer</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    curl --silent --request POST -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>PortInt 5</Label><Description>Future Use</Description><Hidden>false</Hidden><Storage><AttributeName>PortAttrInt5</AttributeName><Type>Integer</Type><ItemType>Port</ItemType></Storage></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition

     

    To see all custom attributes that were created and their ID's for updating.

    http://DataAggServer:8581/rest/customattributedefinition


    To change the Label or Description values, use the following command.
    Change NewLabel and NewDescription to the desired text and replace <ID> with the number found from the URL above.

     

    curl --silent --request PUT -H "Content-Type: application/xml" -d "<CustomAttributeDefinition version='1.0.0'><Label>NewLabel</Label><Description>NewDescription</Description><Hidden>false</Hidden></CustomAttributeDefinition>" http://DataAggServer:8581/rest/customattributedefinition/<ID>



  • 6.  Re: Delete Custom Attributes

    Posted Oct 27, 2017 12:02 PM

    Friend thank you very much for the script, this will be of great help, hug.