Inleiding
Dit document beschrijft de stappen die moeten worden uitgevoerd om tags aan Cisco Intersight-bronnen toe te voegen.
Achtergrondinformatie
Een tag is een generiek stuk sleutel/waarde-metagegevens dat kan worden toegepast op bronnen binnen CIsco Intersight. Deze resources kunnen variëren van serverendpoints, accounts en meer.
Als gebruiker, kunnen de markeringen worden gebruikt om de middelen van het Intersight van Cisco te groeperen die voor het vragen van middelen zullen toestaan die op deze markeringswaarden worden gebaseerd.
Binnen Cisco zijn er verschillende programma's die vertrouwen op Cisco Intersight-resourcetags om specifieke functiesets in/uit te schakelen. Raadpleeg de documentatie bij het specifieke programma voor meer informatie over deze functies en functies.
Accountresourcetags
Vereisten
Wanneer u bent ingelogd via de UI, klikt u op het profielmenu rechtsboven in de UI om de ingelogde account en rol weer te geven.
via de gebruikersinterface
- Klik op de Serviceskiezer
- Selecteer "Systeem"
3. Klik in de weergave Instellingen > Accountgegevens op "Configureren".
4. Van het pop-upvenster "Accountinstellingen configureren" kan een key:value-paar worden ingeleverd om een nieuwe tag toe te voegen.
5. Klik na invoer op "Configureren" om in te dienen
De tag moet worden ingevoerd met een code in het formaat "key:value". Hierboven hebben we bijvoorbeeld het volgende ingevoerd:
AutoRMAEmail:kmccabe2@cisco.com,sttardy@cisco.com
Hiermee maakt u een tag op de accountbron met een sleutel van AutoRMAeMail en een waarde van kmccabe2@cisco.com,sttardy@cisco.com.
Opmerking: bij het toevoegen van een nieuwe tag, zal de automatisch helper voorspelling geen opties tonen. Voer de nieuwe tag in zoals deze exact is gedocumenteerd en druk vervolgens op enter om in te dienen.
6. Geconfigureerde tags kunnen worden gevalideerd vanuit de weergave Accountgegevens
Via de API
1. HTTP GET the iam.Account resource om de Moid van de specifieke Account resource (AccountMoid) te vinden die moet worden bijgewerkt. Bestaande tags die moeten worden bewaard, moeten worden gedocumenteerd.
GET /api/v1/iam/Accounts
RESPONSE:
{
"ObjectType": "iam.Account.List",
"Results": [
{
"AccountMoid": "5eb2e1e47564612d307xxxxx",
"Moid": "5eb2e1e47564612d307xxxxx",
...snip...
"Tags": [{
"Key":"existingKey",
"Value":"existingVal"
}]
}]
}
2. HTTP POST de specifieke iam.Account bron door Moid en de nieuwe en bestaande Tags opnemen in de aanvraag payload.
Opmerking: als de accountresource bestaande tags heeft, moeten deze worden opgenomen in de POST die moet worden bewaard. Als ze niet in de POST zijn opgenomen, worden ze verwijderd uit de accountbron.
POST /api/v1/iam/Accounts/5eb2e1e47564612d307xxxxx
PAYLOAD:
{
"Tags": [{
"Key": "existingKey",
"Value": "existingVal"
}, {
"Key": "ACIProactive",
"Value": "brvarney@cisco.com"
}]
}
Resourcettags voor infrastructuurservices
via de UI List View
Bronnen die worden weergegeven in een lijstweergave via de Infrastructuurservice kunnen worden gelabeld. Bijvoorbeeld servers, clusters, fabric interconnects, chassis, enz.
Opmerking: Proactieve RMA ondersteunt geen functies die zijn ingeschakeld via de Infrastructuur Service resource Tags. Gebruik de onderstaande stappen niet om Proactieve RMA-tags te configureren.
1. Selecteer in een lijstweergave het vakje van de te labelen bronnen
2. Druk op de tag-toets naast de ellips
3. Voer in het pop-upvenster "Set Shared Tags" de key:value-tag in die op alle geselecteerde objecten moet worden toegepast
4. Klik op "Opslaan" om in te dienen
Opmerking: bij het toevoegen van een nieuwe tag, zal de automatisch helper voorspelling geen opties tonen. Voer de nieuwe tag in zoals deze exact is gedocumenteerd en druk vervolgens op enter om in te dienen.
Resourcetags voor organisaties
Via API
1. Open API-documenten voor organisaties
Ga naar de api doc pagina voor organisaties.
Opmerking: als u de Connected Virtual-applicatie gebruikt, navigeer dan naar https://[FQDN van apparaat]/apidocs/apirefs/organisatie/organisaties/model/in plaats daarvan
2. Identificeer de organisatie die u wilt bijwerken.
Raadpleeg de Intersight API Query Guide voor referentie.
Gebruikers kunnen het GET endpoint gebruiken om alle organisaties zonder parameters op te geven. Als er te veel organisaties in uw account zijn om eenvoudig in één uitvoer te kunnen bekijken, kunnen gebruikers een $select query parameter gebruiken om de getoonde velden te beperken, maar er voor zorgen dat Tags worden opgenomen in het $select statement, bijvoorbeeld:
Van de API-output is het veld dat we nodig hebben het Moid-veld, dit is een unieke identificatie voor deze organisatie in intersight en zal worden gebruikt in de volgende stap, we moeten ook alle tags die in zijn voor de volgende stap.
3. Werk de tags van de organisatie bij met het API-eindpunt van de Organisation PATCH tegen de Organisations Moid. Zorg ervoor dat u de bestaande tags die zijn verzameld in het veld lichaam opnieuw invoert, anders worden ze verwijderd.
De behuizing van de voorbeeldpleister roept het volgende op:
{"Tags":[{"Key":"AutoRMAEmail","Value":"joe@somedomain.com"}]}
Alle bestaande tags die op de geregistreerde naam staan, kunnen worden toegevoegd aan de array met tags.
Let op: als u deze procedure volgt voor het configureren van Proactieve RMA, moet het e-mailadres of de e-mailadressen hier correlerend zijn met een CCO-account.
Resourcettags voor apparaatregistratie
Via de API
1. Open API-documenten voor geregistreerde apparaten
Navigeer naar de API-documentpagina voor geregistreerde apparaten
Als u de Connected Virtual-applicatie gebruikt, navigeer dan naar https://[FQDN van apparaat]/apidocs/apirefs/asset/DeviceRegistrations/model/in plaats daarvan
2. Geef aan welk geregistreerd apparaat moet worden bijgewerkt
Raadpleeg de Intersight API Query Guide voor referentie
Een van de eenvoudigste manieren om te vragen is door hostname, om dit te doen, een query kan worden gemaakt als:
DeviceHostname eq 'F340-21-22-UCS4'
Leveraging $filter en $select we zien een meer beheersbare output:
3. Gebruik de PATCH API om tags bij te werken
Extraheer alle tags die al op het geregistreerde apparaat staan, evenals de vocht van het apparaat. Nagivate op het PATCH-eindpunt, plak in de Moid in het bovenste gedeelte van de moid Bijvoorbeeld:
De behuizing van de voorbeeldpleister roept het volgende op:
{"Tags":[{"Key":"AutoRMAEmail","Value":"joe@somedomain.com"}]}
Alle bestaande tags die op de geregistreerde naam staan, kunnen worden toegevoegd aan de array met tags.
Let op: als u deze procedure volgt om Proactieve RMA te configureren, moet het e-mailadres of de e-mailadressen hier worden geregistreerd met een geldige Cisco-gebruikersnaam voor de account.