本文整理匯總了Python中edge.Edge.execute_edge_cli方法的典型用法代碼示例。如果您正苦於以下問題:Python Edge.execute_edge_cli方法的具體用法?Python Edge.execute_edge_cli怎麽用?Python Edge.execute_edge_cli使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類edge.Edge
的用法示例。
在下文中一共展示了Edge.execute_edge_cli方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: EdgeExecuteCli
# 需要導入模塊: from edge import Edge [as 別名]
# 或者: from edge.Edge import execute_edge_cli [as 別名]
from vsm import VSM
from edge import Edge
from expect_client import ExpectClient
import connection
import re
from vmware.common.global_config import pylogger
class EdgeExecuteCli():
def __init__(self):
pass
if __name__ == '__main__':
vsm_obj = VSM("10.112.243.232", "admin", "default", "", "")
edge_create_controller = Edge(vsm_obj)
edge_username = "admin"
edge_password = "default"
schema_key = 'dhcp'
vtysh_command = "show configuration dhcp"
edge_create_controller.execute_edge_cli(vtysh_command,edge_username,edge_password,schema_key)
schema_key = 'ospf'
vtysh_command = "show configuration ospf"
edge_create_controller.execute_edge_cli(vtysh_command,edge_username,edge_password,schema_key)