| 1 |
# Copyright (c) 2020 Arista Networks, Inc. |
| 2 |
# Use of this source code is governed by the Apache License 2.0 |
| 3 |
# that can be found in the COPYING file. |
| 4 |
|
| 5 |
from cvprac.cvp_client import CvpClient |
| 6 |
import ssl |
| 7 |
ssl._create_default_https_context = ssl._create_unverified_context |
| 8 |
import requests.packages.urllib3 |
| 9 |
requests.packages.urllib3.disable_warnings() |
| 10 |
|
| 11 |
# Create connection to CloudVision |
| 12 |
clnt = CvpClient() |
| 13 |
clnt.connect(['cvp1'],'username', 'password') |
| 14 |
|
| 15 |
image_name = "vEOS-4.26.0.1F" |
| 16 |
image = clnt.api.get_image_bundle_by_name(image_name) |
| 17 |
|
| 18 |
container_name = "TP_FABRIC" |
| 19 |
container = clnt.api.get_container_by_name(container_name) |
| 20 |
|
| 21 |
clnt.api.remove_image_from_container(image, container) |