اس lab میں آپ Nexus پر NX-API enable کریں گے، structured JSON output پڑھیں گے، اور agentless Ansible کے تصور کو سمجھیں گے۔
Is lab mein aap Nexus par NX-API enable karenge, structured JSON output parhenge, aur agentless Ansible ke tasawwur ko samjhenge.
In this lab you will enable NX-API on Nexus, read structured JSON output, and understand the agentless Ansible concept.
NX-API switch کو vending machine بنا دیتا ہے: ہاتھ سے command لکھنے کے بجائے آپ کا program request بھیجتا ہے اور صاف ستھرا JSON جواب ملتا ہے۔ Ansible وہ manager ہے جو ایک ہی order تمام vending machines کو بیک وقت بھیجتا ہے۔
NX-API switch ko vending machine bana deta hai: haath se command likhne ke bajaye aap ka program request bhejta hai aur saaf suthra JSON jawab milta hai. Ansible woh manager hai jo ek hi order tamam vending machines ko beek waqt bhejta hai.
NX-API turns the switch into a vending machine: instead of typing commands by hand, your program sends a request and gets a neatly packed JSON answer. Ansible is the manager that sends the same order to every vending machine at once.

EVE-NG میں: 1x Nexus 9000v (N9K-1) جس کا mgmt0 آپ کے PC سے reachable ہو۔ NX-API developer sandbox کھولنے کے لیے ایک web browser۔
EVE-NG mein: 1x Nexus 9000v (N9K-1) jis ka mgmt0 aap ke PC se reachable ho. NX-API developer sandbox kholne ke liye ek web browser.
In EVE-NG: 1x Nexus 9000v (N9K-1) with mgmt0 reachable from your PC. A web browser to open the NX-API developer sandbox.
NX-API enable کریں (N9K-1 پر)۔ اس سے switch کا HTTP API on ہو جاتا ہے تاکہ programs اس سے بات کر سکیں۔
NX-API enable karein (N9K-1 par). Is se switch ka HTTP API on ho jata hai taake programs is se baat kar sakein.
Enable NX-API (on N9K-1). This turns on the switch's HTTP API so programs can talk to it.
configure terminalfeature nxapinxapi http port 80endshow nxapiاپنے browser میں NX-API developer sandbox کھولیں۔ یہ switch کے اندر بنی ہوئی testing page ہے۔
Apne browser mein NX-API developer sandbox kholein. Ye switch ke andar bani hui testing page hai.
Open the NX-API developer sandbox in your browser. It is a testing page built into the switch.
🖱️ اپنے browser میں http://
Sandbox میں 'show version | json' چلائیں۔ Output structured JSON میں آتا ہے — ڈھیلی text کے بجائے keys اور values۔
Sandbox mein 'show version | json' chalyein. Output structured JSON mein aata hai — dhili text ke bajaye keys aur values.
In the sandbox, run 'show version | json'. The output comes back as structured JSON — keys and values instead of loose text.
JSON میں 'host_name' اور 'chassis_id' جیسی keys تلاش کریں۔ Script ان keys کو براہِ راست پڑھ سکتا ہے — نازک text parsing کی ضرورت نہیں۔
JSON mein 'host_name' aur 'chassis_id' jaisi keys talash karein. Script in keys ko braah-e-raast parh sakta hai — naazuk text parsing ki zaroorat nahi.
Find keys like 'host_name' and 'chassis_id' in the JSON. A script can read these keys directly — no fragile text parsing needed.
Ansible agentless ہے: آپ اسے اپنی machine پر install کرتے ہیں، اور یہ SSH پر switches تک پہنچتا ہے۔ Nexus switch پر کوئی agent install نہیں ہوتا۔
Ansible agentless hai: aap isay apni machine par install karte hain, aur ye SSH par switches tak pahunchta hai. Nexus switch par koi agent install nahi hota.
Ansible is agentless: you install it on your own machine, and it reaches switches over SSH. No agent is installed on the Nexus switch itself.
آپ ایک playbook لکھتے ہیں — tasks کی فہرست والی سادہ YAML file۔ ایک playbook بیک وقت دس switches کو ایک جیسا configure کر سکتی ہے۔
Aap ek playbook likhte hain — tasks ki fehrist wali saada YAML file. Ek playbook beek waqt das switches ko ek jaisa configure kar sakti hai.
You write a playbook — a simple YAML file listing tasks. One playbook can configure ten switches at once, identically.
Sandbox میں 'show interface mgmt0 | json' چلائیں اور JSON keys سے interface کا IP address لکھیں۔
Sandbox mein 'show interface mgmt0 | json' chalyein aur JSON keys se interface ka IP address likhein.
In the sandbox, run 'show interface mgmt0 | json' and write down the interface's IP address from the JSON keys.
show nxapi