{"id":331209,"date":"2022-03-29T15:00:26","date_gmt":"2022-03-29T15:00:26","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=331209"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=331209","title":{"rendered":"<span>\u041c\u043e\u0439 \u0434\u0440\u0443\u0433 Netmiko. \u0427\u0430\u0441\u0442\u044c 3: \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Huawei<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043a\u0430\u043a \u043d\u0430\u043a\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Huawei \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0418 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0441\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u043e\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e. \u0412 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Huawei, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435 \u0442\u043e\u0442 \u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Netmiko, \u043d\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u043d\u0444\u0438\u0433 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0439: \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 CloudEngine Huawei, \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f \u0440\u043e\u0443\u0442\u0435\u0440\u0430 AR3200 Huawei.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0432\u0438\u0434\u0435\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e <a href=\"https:\/\/forum.huawei.com\/enterprise\/ru\/forum.php?mod=viewthread&amp;tid=850901\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435 <\/a>\u043d\u0430 \u0424\u043e\u0440\u0443\u043c\u0435 Huawei ICT Club.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ad7\/a26\/08d\/ad7a2608dba702d76d417a29cd73ef78.gif\" width=\"1200\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad7\/a26\/08d\/ad7a2608dba702d76d417a29cd73ef78.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u0434\u0430\u043d\u0438\u044f, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0430\u0441\u044c \u0431\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0438\u0434\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u043a\u043e \u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c: \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 Huawei ICT Club, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0434\u043b\u044f HCIP Datacom, <a href=\"https:\/\/forum.huawei.com\/enterprise\/ru\/forum.php?mod=collection&amp;action=view&amp;ctid=711\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/a> \u043a\u0430\u043a \u043d\u0430 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u0445 \u0441\u0435\u0440\u0438\u0438 S \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 ICMP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u042d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f CloudEngine \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f AR. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u0432\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430. \u041e\u0434\u0438\u043d \u043d\u0430\u0437\u0432\u0430\u043b \u201cswitch_file_config\u201d, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f CloudEngine:<\/p>\n<pre><code class=\"bash\">icmp rate-limit threshold 5  commit  return<\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043d\u0430\u0437\u0432\u0430\u043b \u201crouter_file_config\u201d, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f AR-\u0440\u043e\u0443\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">icmp rate-limit enable  icmp rate-limit threshold 5  return<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0434\u043b\u044f AR \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, \u0430 \u0434\u043b\u044f CE \u043d\u0435\u0442. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f CE \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>commit<\/code>, \u0438\u043d\u0430\u0447\u0435 \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0430\u0434\u0438\u043c\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430?<\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>display version<\/code>, \u0437\u0430\u0442\u0435\u043c \u0438\u0449\u0435\u0442 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0435 \u0442\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0435\u043c\u0443 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>list_versions<\/code>:<\/p>\n<pre><code class=\"python\">list_versions = ['CE6800 V200R005C10SPC607B607',                  'AR3200 V200R003C00'                  ]<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u201c\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0441\u044c \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443\u201d + IP \u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0417\u0430\u0442\u0435\u043c \u201c\u0418\u0449\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u041f\u041e\u201d + \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <code>list_versions<\/code>. \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u0442, \u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u201c\u041d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u041f\u041e\u201d + \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <code>list_versions<\/code>. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u0442, \u0442\u043e \u201c\u041d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438\u201d + \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <code>list_versions<\/code>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0438\u043a\u043b\u0430 <code>for in<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 devices, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0435\u043b\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u0432 \u0446\u0438\u043a\u043b\u0435. \u0417\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>if-elif-else<\/code> \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u0438\u043a\u0438 \u00ab\u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442\/\u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442\u00bb. \u0418 \u043c\u0435\u0442\u043e\u0434 <code>find()<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0435\u0440\u043d\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 -1, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043e.<\/p>\n<pre><code class=\"python\"># \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e for software_ver in list_versions:     print ('\u0418\u0449\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u041f\u041e ' + software_ver)     output_version = ssh_connect.send_command('display version')     int_version = 0 # \u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0446\u0435\u043b\u044c\u043d\u043e\u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435     int_version = output_version.find(software_ver) # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e     if int_version > 0:         print ('\u041d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u041f\u041e ' + software_ver)         break     else:         print ('\u041d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 ' + software_ver)<\/code><\/pre>\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 <code>break<\/code> \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0446\u0438\u043a\u043b \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430 \u043a\u0430\u043a\u0438\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f CE6800, \u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c <code>config_lines_switch<\/code>, \u0430 \u0435\u0441\u043b\u0438 AR3200, \u0442\u043e \u043a <code>config_lines_router<\/code>:<\/p>\n<pre><code class=\"python\">if software_ver == 'CE6800 V200R005C10SPC607B607':     print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')     output = ssh_connect.send_config_set(config_lines_switch) elif software_ver == 'AR3200 V200R003C00':     print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')     output = ssh_connect.send_config_set(config_lines_router) print(f\"\\n\\n-------------- \u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e {network_device['ip']} --------------\") print(output) print(\"----------------------- \u041a\u043e\u043d\u0435\u0446 ----------------------\")<\/code><\/pre>\n<p>\u0414\u043b\u044f \u044d\u0441\u0442\u0435\u0442\u0438\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u044b\u043a\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0434\u043f\u0438\u0441\u044f\u043c\u0438 \u201c\u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u201d + IP, \u0438 \u201c\u041a\u043e\u043d\u0435\u0446\u201d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/907\/af7\/e92\/907af7e9202d240fc2e96976cbde758a.png\" width=\"1279\" height=\"1299\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/907\/af7\/e92\/907af7e9202d240fc2e96976cbde758a.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0438\u0434\u0435\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u043d\u0430\u043a\u0430\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/forum.huawei.com\/enterprise\/ru\/forum.php?mod=viewthread&amp;tid=850901\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">from getpass import getpass from netmiko import ConnectHandler from netmiko.ssh_exception import NetMikoTimeoutException from paramiko.ssh_exception import SSHException from netmiko.ssh_exception import AuthenticationException  username = input('\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f SSH: ') password = getpass()  with open('switch_file_config') as f:     config_lines_switch = f.read().splitlines()  with open('router_file_config') as f:     config_lines_router = f.read().splitlines()  with open('mydevices') as f:     ip_lines = f.read().splitlines()  for device in ip_lines:     print ('\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0441\u044c \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443: ' + device)     ip_address_of_device = device     network_device = {         'device_type': 'huawei',         'ip':   ip_address_of_device,         'username': username,         'password': password     }      try:         ssh_connect = ConnectHandler(**network_device)     except (AuthenticationException):         print ('\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438: ' + ip_address_of_device)         continue     except (NetMikoTimeoutException):         print ('\u041d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: ' + ip_address_of_device)         continue     except (SSHException):         print ('SSH \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u043b\u0438 SSH? ' + ip_address_of_device)         continue      # \u0412\u0438\u0434\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432     list_versions = ['CE6800 V200R005C10SPC607B607',                      'AR3200 V200R003C00'                      ]      # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e     for software_ver in list_versions:         print ('\u0418\u0449\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u041f\u041e ' + software_ver)         output_version = ssh_connect.send_command('display version')         int_version = 0 # \u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0446\u0435\u043b\u044c\u043d\u043e\u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435         int_version = output_version.find(software_ver) # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e         if int_version > 0:             print ('\u041d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u041f\u041e ' + software_ver)             break         else:             print ('\u041d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 ' + software_ver)       if software_ver == 'CE6800 V200R005C10SPC607B607':         print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')         output = ssh_connect.send_config_set(config_lines_switch)     elif software_ver == 'AR3200 V200R003C00':         print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')         output = ssh_connect.send_config_set(config_lines_router)     print(f\"\\n\\n-------------- \u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e {network_device['ip']} --------------\")     print(output)     print(\"----------------------- \u041a\u043e\u043d\u0435\u0446 ----------------------\")<\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u043e\u0441\u0442\u0430\u0445:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/655015\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 exception \u043f\u0440\u0438 \u043d\u0430\u043a\u0430\u0442\u0435 Python-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 Huawei<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/users\/vasyo\/posts\/\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0439 \u0434\u0440\u0443\u0433 Netmiko. \u0427\u0430\u0441\u0442\u044c 2: \u0422\u0440\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f Python-\u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/huawei\/blog\/594229\/comments\/\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0439 \u0434\u0440\u0443\u0433 Netmiko<\/a><\/p>\n<p>\u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430:<\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/5563089\/raw-input-function-in-python\" rel=\"noopener noreferrer nofollow\">https:\/\/stackoverflow.com\/questions\/5563089\/raw-input-function-in-python<\/a><\/p>\n<p><a href=\"https:\/\/pynet.twb-tech.com\/blog\/automation\/netmiko.html\" rel=\"noopener noreferrer nofollow\">https:\/\/pynet.twb-tech.com\/blog\/automation\/netmiko.html<\/a><\/p>\n<p><a href=\"https:\/\/pyneng.readthedocs.io\/en\/latest\/book\/18_ssh_telnet\/netmiko.html\" rel=\"noopener noreferrer nofollow\">https:\/\/pyneng.readthedocs.io\/en\/latest\/book\/18_ssh_telnet\/netmiko.html<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/ktbyers\/netmiko\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ktbyers\/netmiko<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/ktbyers\/netmiko\/blob\/master\/netmiko\/ssh_dispatcher.py\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ktbyers\/netmiko\/blob\/master\/netmiko\/ssh_dispatcher.py<\/a><\/p>\n<p>Udemy.com &#8212; Python Network Programming for Network Engineers (Python 3) (David Bombal)<\/p>\n<p><a href=\"https:\/\/www.pythoncentral.io\/pythons-range-function-explained\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.pythoncentral.io\/pythons-range-function-explained<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/657981\/\"> https:\/\/habr.com\/ru\/post\/657981\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043a\u0430\u043a \u043d\u0430\u043a\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Huawei \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0418 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0441\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0442\u0430\u043a\u043e\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u043e. \u0412 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Huawei, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435 \u0442\u043e\u0442 \u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Netmiko, \u043d\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u043d\u0444\u0438\u0433 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0439: \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 CloudEngine Huawei, \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f \u0440\u043e\u0443\u0442\u0435\u0440\u0430 AR3200 Huawei.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0432\u0438\u0434\u0435\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e <a href=\"https:\/\/forum.huawei.com\/enterprise\/ru\/forum.php?mod=viewthread&amp;tid=850901\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435 <\/a>\u043d\u0430 \u0424\u043e\u0440\u0443\u043c\u0435 Huawei ICT Club.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u0434\u0430\u043d\u0438\u044f, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0430\u0441\u044c \u0431\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0438\u0434\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u043a\u043e \u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c: \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 Huawei ICT Club, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0434\u043b\u044f HCIP Datacom, <a href=\"https:\/\/forum.huawei.com\/enterprise\/ru\/forum.php?mod=collection&amp;action=view&amp;ctid=711\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/a> \u043a\u0430\u043a \u043d\u0430 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u0445 \u0441\u0435\u0440\u0438\u0438 S \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 ICMP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u042d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f CloudEngine \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f AR. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u0432\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430. \u041e\u0434\u0438\u043d \u043d\u0430\u0437\u0432\u0430\u043b \u201cswitch_file_config\u201d, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f CloudEngine:<\/p>\n<pre><code class=\"bash\">icmp rate-limit threshold 5  commit  return<\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043d\u0430\u0437\u0432\u0430\u043b \u201crouter_file_config\u201d, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f AR-\u0440\u043e\u0443\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">icmp rate-limit enable  icmp rate-limit threshold 5  return<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0434\u043b\u044f AR \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, \u0430 \u0434\u043b\u044f CE \u043d\u0435\u0442. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f CE \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>commit<\/code>, \u0438\u043d\u0430\u0447\u0435 \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0430\u0434\u0438\u043c\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430?<\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>display version<\/code>, \u0437\u0430\u0442\u0435\u043c \u0438\u0449\u0435\u0442 \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0435 \u0442\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0435\u043c\u0443 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>list_versions<\/code>:<\/p>\n<pre><code class=\"python\">list_versions = ['CE6800 V200R005C10SPC607B607',                  'AR3200 V200R003C00'                  ]<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u201c\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0441\u044c \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443\u201d + IP \u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0417\u0430\u0442\u0435\u043c \u201c\u0418\u0449\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u041f\u041e\u201d + \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <code>list_versions<\/code>. \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u0442, \u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u201c\u041d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u041f\u041e\u201d + \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <code>list_versions<\/code>. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u0442, \u0442\u043e \u201c\u041d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438\u201d + \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <code>list_versions<\/code>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0438\u043a\u043b\u0430 <code>for in<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 devices, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0435\u043b\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u0432 \u0446\u0438\u043a\u043b\u0435. \u0417\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>if-elif-else<\/code> \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u0438\u043a\u0438 \u00ab\u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442\/\u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442\u00bb. \u0418 \u043c\u0435\u0442\u043e\u0434 <code>find()<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0435\u0440\u043d\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 -1, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043e.<\/p>\n<pre><code class=\"python\"># \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e for software_ver in list_versions:     print ('\u0418\u0449\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u041f\u041e ' + software_ver)     output_version = ssh_connect.send_command('display version')     int_version = 0 # \u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0446\u0435\u043b\u044c\u043d\u043e\u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435     int_version = output_version.find(software_ver) # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e     if int_version > 0:         print ('\u041d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u041f\u041e ' + software_ver)         break     else:         print ('\u041d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 ' + software_ver)<\/code><\/pre>\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 <code>break<\/code> \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0446\u0438\u043a\u043b \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430 \u043a\u0430\u043a\u0438\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f CE6800, \u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c <code>config_lines_switch<\/code>, \u0430 \u0435\u0441\u043b\u0438 AR3200, \u0442\u043e \u043a <code>config_lines_router<\/code>:<\/p>\n<pre><code class=\"python\">if software_ver == 'CE6800 V200R005C10SPC607B607':     print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')     output = ssh_connect.send_config_set(config_lines_switch) elif software_ver == 'AR3200 V200R003C00':     print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')     output = ssh_connect.send_config_set(config_lines_router) print(f\"\\n\\n-------------- \u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e {network_device['ip']} --------------\") print(output) print(\"----------------------- \u041a\u043e\u043d\u0435\u0446 ----------------------\")<\/code><\/pre>\n<p>\u0414\u043b\u044f \u044d\u0441\u0442\u0435\u0442\u0438\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u044b\u043a\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0434\u043f\u0438\u0441\u044f\u043c\u0438 \u201c\u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u201d + IP, \u0438 \u201c\u041a\u043e\u043d\u0435\u0446\u201d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0438\u0434\u0435\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u043d\u0430\u043a\u0430\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/forum.huawei.com\/enterprise\/ru\/forum.php?mod=viewthread&amp;tid=850901\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">from getpass import getpass from netmiko import ConnectHandler from netmiko.ssh_exception import NetMikoTimeoutException from paramiko.ssh_exception import SSHException from netmiko.ssh_exception import AuthenticationException  username = input('\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f SSH: ') password = getpass()  with open('switch_file_config') as f:     config_lines_switch = f.read().splitlines()  with open('router_file_config') as f:     config_lines_router = f.read().splitlines()  with open('mydevices') as f:     ip_lines = f.read().splitlines()  for device in ip_lines:     print ('\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0441\u044c \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443: ' + device)     ip_address_of_device = device     network_device = {         'device_type': 'huawei',         'ip':   ip_address_of_device,         'username': username,         'password': password     }      try:         ssh_connect = ConnectHandler(**network_device)     except (AuthenticationException):         print ('\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438: ' + ip_address_of_device)         continue     except (NetMikoTimeoutException):         print ('\u041d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: ' + ip_address_of_device)         continue     except (SSHException):         print ('SSH \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u043b\u0438 SSH? ' + ip_address_of_device)         continue      # \u0412\u0438\u0434\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432     list_versions = ['CE6800 V200R005C10SPC607B607',                      'AR3200 V200R003C00'                      ]      # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e     for software_ver in list_versions:         print ('\u0418\u0449\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u041f\u041e ' + software_ver)         output_version = ssh_connect.send_command('display version')         int_version = 0 # \u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0446\u0435\u043b\u044c\u043d\u043e\u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435         int_version = output_version.find(software_ver) # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e         if int_version > 0:             print ('\u041d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u041f\u041e ' + software_ver)             break         else:             print ('\u041d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 ' + software_ver)       if software_ver == 'CE6800 V200R005C10SPC607B607':         print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')         output = ssh_connect.send_config_set(config_lines_switch)     elif software_ver == 'AR3200 V200R003C00':         print ('\u041d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ' + software_ver + '...')         output = ssh_connect.send_config_set(config_lines_router)     print(f\"\\n\\n-------------- \u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e {network_device['ip']} --------------\")     print(output)     print(\"----------------------- \u041a\u043e\u043d\u0435\u0446 ----------------------\")<\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u043e\u0441\u0442\u0430\u0445:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/655015\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 exception \u043f\u0440\u0438 \u043d\u0430\u043a\u0430\u0442\u0435 Python-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 Huawei<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/users\/vasyo\/posts\/\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0439 \u0434\u0440\u0443\u0433 Netmiko. \u0427\u0430\u0441\u0442\u044c 2: \u0422\u0440\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f Python-\u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/huawei\/blog\/594229\/comments\/\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0439 \u0434\u0440\u0443\u0433 Netmiko<\/a><\/p>\n<p>\u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430:<\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/5563089\/raw-input-function-in-python\" rel=\"noopener noreferrer nofollow\">https:\/\/stackoverflow.com\/questions\/5563089\/raw-input-function-in-python<\/a><\/p>\n<p><a href=\"https:\/\/pynet.twb-tech.com\/blog\/automation\/netmiko.html\" rel=\"noopener noreferrer nofollow\">https:\/\/pynet.twb-tech.com\/blog\/automation\/netmiko.html<\/a><\/p>\n<p><a href=\"https:\/\/pyneng.readthedocs.io\/en\/latest\/book\/18_ssh_telnet\/netmiko.html\" rel=\"noopener noreferrer nofollow\">https:\/\/pyneng.readthedocs.io\/en\/latest\/book\/18_ssh_telnet\/netmiko.html<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/ktbyers\/netmiko\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ktbyers\/netmiko<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/ktbyers\/netmiko\/blob\/master\/netmiko\/ssh_dispatcher.py\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ktbyers\/netmiko\/blob\/master\/netmiko\/ssh_dispatcher.py<\/a><\/p>\n<p>Udemy.com &#8212; Python Network Programming for Network Engineers (Python 3) (David Bombal)<\/p>\n<p><a href=\"https:\/\/www.pythoncentral.io\/pythons-range-function-explained\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.pythoncentral.io\/pythons-range-function-explained<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/657981\/\"> https:\/\/habr.com\/ru\/post\/657981\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-331209","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/331209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331209"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/331209\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}