2024-10-02 02:23:55 发布
网友
我想用libcoud列出ec2区域中的节点。我该怎么做?下面只有东方。在
Driver = get_driver(Provider.EC2) conn = Driver(key, secret) conn.list_nodes()
您可以通过驱动程序初始化来完成此操作。例如:
ec2_conn = get_driver(Provider.EC2)(aws_key, aws_secret, region='us-west-1') instances = ec2_conn.list_nodes(ex_node_ids=[i-xxxxxx]) print instances
您可以获得该地区的相关驱动程序:
cls = get_driver(Provider.EC2_US_WEST) driver = cls(ACCESS_ID, SECRET_KEY)
取自this documentation page中的底部示例。在
您可以通过驱动程序初始化来完成此操作。例如:
您可以获得该地区的相关驱动程序:
取自this documentation page中的底部示例。在
相关问题 更多 >
编程相关推荐