QuestionQ46

VerifiedOperations

A server profile whose name contains the string "WEST15" must have that string changed to "LXT14". For example, the server profile "VMHOST-WEST15-01" must be changed to "VMHOST-LXT14-01".

Using the Cisco Intersight REST API in a Python script, which two GET API requests retrieve only the server profile whose name contains "WEST15" and provide the correct API-request body to update its name? Assume that the variable sp_name holds the retrieved server profile's name.

Choose two
Explanation

Cisco Intersight collection queries support OData-style $filter expressions, and contains(Name, 'WEST15') matches profile names with WEST15 in any position. Python str.replace('WEST15', 'LXT14') replaces that literal substring in the retrieved name, producing the updated Name value.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!