How to tag a block storage using softlayer api

為{幸葍}努か 提交于 2019-12-24 06:04:14

问题


I can't find any method about tag a block storage in following link:

https://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage_Iscsi

Also I checked the command of tag:

https://sldn.softlayer.com/reference/services/SoftLayer_Tag

This command seems like what I want, but I still met some problems:

  1. For the parameter tagTypes, the supported types I get are:

    {'keyName': 'HARDWARE', 'description': 'Hardware'},
    {'keyName': 'GUEST', 'description': 'CCI'},
    {'keyName': 'ACCOUNT_DOCUMENT', 'description': 'Account Document'},
    {'keyName': 'TICKET', 'description': 'Ticket'},
    {'keyName': 'NETWORK_VLAN_FIREWALL', 'description': 'Vlan Firewall'},
    {'keyName': 'CONTRACT', 'description': 'Contract'},
    {'keyName': 'IMAGE_TEMPLATE', 'description': 'Image Template'},
    {'keyName': 'APPLICATION_DELIVERY_CONTROLLER', 'description': 'Application Delivery Controller'},
    {'keyName': 'NETWORK_VLAN', 'description': 'Vlan'}
    

Not sure which one is proper for block storage.

  1. I tried with tagType "HARDWARE" and tired to set the tag to block storage, the response shows "You do not have permissions to tag this object"

Anyone can help to give some advice, thanks in advance.


回答1:


I am affraid that is not possbiel to tag the block storages, the object Network_Storage_Iscsi should have a property called tagReference but as you can see in documentation it does not have it: https://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_Storage_Iscsi

For example other objects that can be tagged have that property e.g. Tickets or image templates see:

http://sldn.softlayer.com/reference/datatypes/SoftLayer_Ticket http://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest_Block_Device_Template_Group

Addiotionally the method: https://sldn.softlayer.com/reference/services/SoftLayer_Tag/getAllTagTypes

it should return Network_Storage as a valid type, but it does not.

Regards



来源:https://stackoverflow.com/questions/41587934/how-to-tag-a-block-storage-using-softlayer-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!