本文整理汇总了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)