操屁眼的视频在线免费看,日本在线综合一区二区,久久在线观看免费视频,欧美日韩精品久久综

新聞資訊

    需求分析,實現原理

    需求背景:日常網絡運維中網管人員需要頻繁登錄到網絡設備進行日常巡檢等操作,如果現網設備很多,需要記錄大量的設備管理ip,這對我們運維人員很不友好python獲取設備管理器,所以有沒有一種工具或者腳本可以通過人機交互的方式幫助我們登錄網絡設備?

    實現原理:簡單來說就是運維人員和腳本交互獲取到我們想登錄的網絡設備的管理ippython獲取設備管理器,然后腳本自動發起連接網絡設備請求來達到模擬登錄的作用,這里選擇使用來實現我們的腳本。

    寫腳本

    代碼的核心內容如下:

    while True:
        print('請輸入數字序號進入下一級,b返回上一級,q退出當前程序')
    

    迅雷vip賬號分享器獲取器_python獲取設備管理器_python 獲取鍵盤輸入

    for i, k in enumerate(curr_layer): print(i, k) select_layer[i] = k choice = input('please input your choice:').strip() if not choice: continue

    python 獲取鍵盤輸入_python獲取設備管理器_迅雷vip賬號分享器獲取器

    if choice.isdigit(): if select_layer[int(choice)] in curr_layer: if type(curr_layer[select_layer[int(choice)]]) is list: os.environ['ip'] = curr_layer[select_layer[int(choice)]][0] os.environ['port'] = curr_layer[select_layer[int(choice)]][1] os.system('telnet $ip $port')

    python獲取設備管理器_python 獲取鍵盤輸入_迅雷vip賬號分享器獲取器

    time.sleep(2) continue last_layer.append(curr_layer) curr_layer = curr_layer[select_layer[int(choice)]] else: if choice == 'b':

    迅雷vip賬號分享器獲取器_python獲取設備管理器_python 獲取鍵盤輸入

    if len(last_layer) > 0: # print(last_layer) # test curr_layer = last_layer[-1] last_layer.pop() # print(curr_layer) #test # print(last_layer) #test

    迅雷vip賬號分享器獲取器_python獲取設備管理器_python 獲取鍵盤輸入

    else: print("This is top lever") elif choice == 'q': print('bye') break else: print("輸入錯誤,請重新輸入")

    文章還未寫完,后面會繼續更新

網站首頁   |    關于我們   |    公司新聞   |    產品方案   |    用戶案例   |    售后服務   |    合作伙伴   |    人才招聘   |   

友情鏈接: 餐飲加盟

地址:北京市海淀區    電話:010-     郵箱:@126.com

備案號:冀ICP備2024067069號-3 北京科技有限公司版權所有