Question 99 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question 99 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question

DRAG DROP -

rackunit_json_body = {

“request_method”: “[item 1]”,

“request_path”: (‘https://www.intersight .com/api/vi/'+

‘compute/RackUnits?$select= [item 2] ')

,

firmware_json_body = {

item 3],

“request_method”:

“resource_path”: “https://www.intersight .com/api/vi/firmware/[item 4]”,

“request_body”: {
“DirectDownload”: {},
“Networkshare”: {

“Maptype”: “www”,

~[item 5]”: “nw_upgrade_full”,

“HttpServer”: {
“LocationLink”: “http://10.10.10.10/ucs-c240m4-huu-4.0.2h.iso”,

i
“UpgradeType”: “[item 6 |”,

“server”:

y
RESPONSE = requests. request (method=rackunit_json_body[ ‘request_method’ ],
url=BURL+rackunit_json_body[‘resource_path’], auth-AUTH)

firmware_json_body[ ‘request_body’][‘Server’] = (
json. loads (RESPONSE. text) [ ‘Results’ ] [0] [‘[item 7 ]'])

RESPONSE = requests. request (method=firmware_json_body[‘request_method’],
ur1=BURL+firmware_json_body[‘*resource_path’],

data=json.dumps (firmware_json_body[ ‘request_body’]), auth=AUTH)

Request Model -

8 DirectDownload: [1] Complex Object
5 Object: {0}
= NetworkShare: [1] Complex Object
5 Object: {0}
UpgradeType: string Desired upgrade made to choose either direct download based
upgrade or network share upgrade.

enum:[direct_upgrade,network_upgrade]
8 Device: [1] MoRef to assetDeviceRegistration
© Object: {3}
ObjectType: string (Read Only) The Object Type of the referenced REST resource.

Moid: string (Read Only) The Moid of the referenced REST resource.

Selector: string (Read Only) An OData $filter expression which describes the
REST resource to be referenced. This field may be set
instead of 'moid' by clients. If ‘moid' is set this field is
ignored. If ‘selector’ is set and ‘moid' is empty/absent
from the request. Intersight will determine the Moid
of the resource matching the filter expression and
populate it in the MoRef that is part of the object
instance being inserted/updated to fulfill the REST
request. An error is returned if the filter matches zero
or more than one REST resource.
An example filter string is: Serial eq ‘3AA8B7T11'.

Refer to the exhibit above and click on the resource tabs in the top left corner to view resources to help with this question.

The script uses the Cisco Intersight REST API.

Drag and drop the code from the left onto the item numbers on the right to match the missing sections in the Python script to update the firmware on a specific Cisco Intersight managed UCS rack server, DMZ-R-L3-ADJM.

Not all code snippets are used.

Select and Place:

Answer Area

PUT item 1

POST item 2

GET item 3

Upgradeoption item 4

Upgrades item 5

Moid,Model,AssetTag&'+'$filter= item 6
Model ne \'DMZ-R-L3-ADJM\’

Moid,Model,AssetTag&'+' $filter= item 7

AssetTag eq \' DMZ-R-L3-ADJM\

Moid

ObjectType

network_upgrade

Explanations

Answer Area

AssetTag eq \'DMZ-R-L3-ADJM\

PUT GET
post Moid,Model,AssetTag&'+' $filter=
AssetTag eq \'DMZ-R-L3-ADJM\
GET PUT
Upgradeoption ObjectType
Upgrades network_upgrade

Moid,Model,AssetTag&'+'$filter= Uparadeoption
Model ne \DMZ-R-L3-ADJM\’ ParaewoP
Moid,Model,AssetTag&'+' $filter= Moid

Moid

ObjectType

network_upgrade