Tags

Tags and Tag Types

Cisco UCS Central uses tags to allow users to group objects outside of the Organization or Domain Group structures. You can use the following types of tags:

  • System-defined tags—Tags that are defined by Cisco UCS Central. This includes the Maintenance Group tag, the Operating System for HCR tag, and the Adapter Driver for HCR tag.

  • User-defined tags—Tags that are created by users but have specific values.

  • Basic tags—Free text tags that can allow any value.

From the Tag Management page in the GUI, you can view all Tag Types that have been created in Cisco UCS Central. However, you can view only the Tags that are associated with an object and are in active use at any given time.

Creating Tag Types

You can add tags to policies, logical resources such as service profiles and ID pools, and physical inventory components such as domains or servers.

Note

Only users with the Tag permission can create tag types.


Procedure

  Command or Action Purpose
Step 1

UCSC # connect policy-mgr

Enters policy manager mode.
Step 2

UCSC(policy-mgr) #scope fabric

Scopes into the fabric interconnect.

Step 3

UCSC(policy-mgr) /fabric # scope tag-mgmt

Scopes into tag management.

Step 4

UCSC(policy-mgr) /fabric/tag-mgmt # create tag-type tag-type-name

Creates the tag type.

Step 5

(Optional) UCSC(policy-mgr) /fabric/tag-mgmt/tag-type/tag-item # set {color | descr | restricted {yes|no}}

(Optional)

Sets the following for the tag type:

  • Color—Sets the color for the tag display.
    Note 

    You must enter color in hex code.

  • Description—Allows user to enter a description.

  • Restriction—Yes | No

    • No—Does not restrict the tag. Allows you to enter any text to the tag.

    • Yes—Restricts the tag to a predefined list. You can create a list of values, or add additional values to an existing list of values. When you assign the tag, you choose one of the values from the list.

Step 6

UCSC(policy-mgr) /fabric/tag-mgmt/tag-type/tag-item # commit-buffer

Commits the transaction to the system.

Example

The following example shows how to create a tag and set options for it:


UCSC# connect policy-mgr
UCSC(policy-mgr)# scope fabric
UCSC(policy-mgr) /fabric # scope tag-mgmt
UCSC(policy-mgr) /fabric/tag-mgmt # create tag-type USA 
UCSC(policy-mgr) /fabric/tag-mgmt/tag-type # set color 722607
UCSC(policy-mgr) /fabric/tag-mgmt/tag-type # set descr 'USA updates'
UCSC(policy-mgr) /fabric/tag-mgmt/tag-type # set restricted no
UCSC(policy-mgr) /fabric/tag-mgmt/tag-type/tag-item # commit-buffer

Creating Tag Values

Procedure

  Command or Action Purpose
Step 1

UCSC # connect policy-mgr

Enters policy manager mode.
Step 2

UCSC(policy-mgr) #scope fabric

Scopes into the fabric interconnect.

Step 3

UCSC(policy-mgr) /fabric # scope tag-mgmt

Scopes into tag management.

Step 4

UCSC(policy-mgr) /fabric/tag-mgmt # scope tag-type tag-type

Scopes into a specific tag type.

Step 5

UCSC(policy-mgr) /fabric/tag-mgmt/tag-type/tag-item # create tag-item tag-name

Creates a new tag value.

Step 6

UCSC(policy-mgr) /fabric/tag-mgmt/tag-type/tag-item # commit-buffer

Commits the transaction to the system.

Example

The following example shows how to create tag values:


UCSC# connect policy-mgr
UCSC(policy-mgr)# scope fabric
UCSC(policy-mgr) /fabric # scope tag-mgmt
UCSC(policy-mgr) /fabric/tag-mgmt # show tag-type
Tag Type:
    Name                      Color      System Defined Multiple Restricted
    ------------------------- ---------- -------------- -------- ----------
    Adapter Driver for HCR    049fd9     Yes            Yes      Yes
    Basic                     5bc0de     Yes            Yes      No
    Geographic                5bc0de     No             Yes      No
    Maintenance Group         049fd9     Yes            No       Yes
    Operating System for HCR  049fd9     Yes            No       Yes
UCSC(policy-mgr) /fabric/tag-mgmt # scope tag-type 'Maintenance Group' 
UCSC(policy-mgr) /fabric/tag-mgmt/tag-type # create tag-item FW_Update
UCSC(policy-mgr) /fabric/tag-mgmt/tag-type/tag-item # commit-buffer

Viewing Tags

Procedure

  Command or Action Purpose
Step 1

UCSC # connect policy-mgr

Enters policy manager mode.
Step 2

UCSC(policy-mgr) #scope fabric

Scopes into the fabric interconnect.

Step 3

UCSC(policy-mgr) /fabric # scope tag-mgmt

Scopes into tag management.

Step 4

UCSC(policy-mgr) /fabric/tag-mgmt # show tag-type

Displays all tag types.

Step 5

UCSC(policy-mgr) /fabric/tag-mgmt # scope tag-type 'tag-type'

Scopes into a specific tag type.

Step 6

UCSC(policy-mgr) /fabric/tag-mgmt/tag-type # show tag-item

Displays the values for the selected tag.

Example

The following example shows how to view maintenance group tags:


UCSC# connect policy-mgr
UCSC(policy-mgr)# scope fabric
UCSC(policy-mgr) /fabric # scope tag-mgmt
UCSC(policy-mgr) /fabric/tag-mgmt # show tag-type
Tag Type:
    Name                      Color      System Defined Multiple Restricted
    ------------------------- ---------- -------------- -------- ----------
    Adapter Driver for HCR    049fd9     Yes            Yes      Yes
    Basic                     5bc0de     Yes            Yes      No
    Geographic                5bc0de     No             Yes      No
    Maintenance Group         049fd9     Yes            No       Yes
    Operating System for HCR  049fd9     Yes            No       Yes
UCSC(policy-mgr) /fabric/tag-mgmt # scope tag-type 'Maintenance Group' 
UCSC(policy-mgr) /fabric/tag-mgmt/tag-type # show tag-item
Tag Item:
    Value
    -----
    tag1
    tag2
    tag3
    tag4