📝 Section Review: Automation
اہم نکاتKey TakeawaysKey Takeaways
- EEM دستی CLI کام کو automated event-driven actions میں بدل دیتا ہے۔EEM dasti CLI kaam ko automated event-driven actions mein badal deta hai.EEM turns reactive CLI work into automated event-driven actions.
- Saved outputs پر Python + regex automated checks کا سب سے تیز راستہ ہے۔Saved outputs par Python + regex automated checks ka sab se tez rasta hai.Python + regex on saved outputs is the fastest path to automated checks.
- NETCONF اور RESTCONF screen-scraping کی جگہ structured XML/JSON دیتے ہیں — shape YANG طے کرتا ہے۔NETCONF aur RESTCONF screen-scraping ki jagah structured XML/JSON dete hain — shape YANG tay karta hai.NETCONF and RESTCONF replace screen-scraping with structured XML/JSON — YANG defines the shape.
- Automation کو ہمیشہ پہلے lab میں محفوظ طریقے سے ٹیسٹ کریں — خراب EEM applet بہتری کی بجائے بگاڑ بھی سکتی ہے۔Automation ko hamesha pehle lab mein mehfooz tareeqay se test karein — kharab EEM applet behtari ki bajaye bigar bhi sakti hai.Always verify automation safely in a lab first — a bad EEM applet can make things worse, not better.
خود جانچ (مشق)Self-Check (Practice)Self-Check (Practice)
یہ مشقی سوالات ہیں، امتحانی سوالات نہیں۔These are practice questions, not exam questions.These are practice questions, not exam questions.
❓ EEM applet کو کیا trigger کر سکتا ہے؟EEM applet ko kya trigger kar sakta hai?What can trigger an EEM applet?
Scheduled events (cron) یا syslog patterns — پھر CLI actions خود بخود، جیسے رات کو config backup۔Scheduled events (cron) ya syslog patterns — phir CLI actions khud-ba-khud, jaise raat ko config backup.Scheduled events (cron) or syslog patterns — then run CLI actions automatically, like nightly config backups.
❓ Python سے device output کیسے parse کرتے ہیں؟Python se device output kaise parse karte hain?How do you parse device output with Python?
'Show' output فائل میں save کریں، Python میں پڑھیں، regex سے hostname یا routes جیسے fields نکالیں۔'Show' output file mein save karein, Python mein parhen, regex se hostname ya routes jaise fields nikalen.Save 'show' output to a file, read it in Python, use regex to extract fields like hostname or routes.
❓ NETCONF vs RESTCONF؟NETCONF vs RESTCONF?NETCONF vs RESTCONF?
NETCONF: XML over SSH، fixed operations۔ RESTCONF: JSON کے ساتھ HTTP verbs — web developers کے لیے آسان۔ YANG دونوں کا data model طے کرتا ہے۔NETCONF: XML over SSH, fixed operations. RESTCONF: JSON ke saath HTTP verbs — web developers ke liye asaan. YANG dono ka data model tay karta hai.NETCONF: XML over SSH, fixed operations. RESTCONF: HTTP verbs with JSON — friendlier for web developers. YANG defines the data model for both.