Skip to content

Commit

Permalink
Fix(cv_device_v3): Update format string (#396)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Grimonet <tgrimonet@arista.com>
  • Loading branch information
ankudinov and titom73 authored Sep 20, 2021
1 parent 5a3ef59 commit 6ebfc91
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ def move_device(self, user_inventory: DeviceInventory):
if device.system_mac is not None:
new_container_info = self.get_container_info(container_name=device.container)
if new_container_info is None:
error_message = 'The target container \'{1}\' for the device \'{2}\' does not exist on CVP.'.format(device.container, device.fqdn)
error_message = 'The target container \'{0}\' for the device \'{1}\' does not exist on CVP.'.format(device.container, device.fqdn)
MODULE_LOGGER.error(error_message)
self.__ansible.fail_json(msg=error_message)
current_container_info = self.get_container_current(device_mac=device.system_mac)
Expand Down Expand Up @@ -1066,7 +1066,7 @@ def deploy_device(self, user_inventory: DeviceInventory):
for configlet in device.configlets:
new_configlet = self.__get_configlet_info(configlet_name=configlet)
if new_configlet is None:
error_message = "The configlet \'{1}\' defined to be applied on the device \'{2}\' does not \
error_message = "The configlet \'{0}\' defined to be applied on the device \'{1}\' does not \
exist on the CVP server.".format(str(configlet), str(device.fqdn))
MODULE_LOGGER.error(error_message)
self.__ansible.fail_json(msg=error_message)
Expand All @@ -1087,7 +1087,7 @@ def deploy_device(self, user_inventory: DeviceInventory):
# Check if the target container exists
target_container_info = self.get_container_info(container_name=device.container)
if target_container_info is None:
error_message = 'The target container \'{1}\' for the device \'{2}\' does not exist on CVP.'.format(device.container, device.fqdn)
error_message = 'The target container \'{0}\' for the device \'{1}\' does not exist on CVP.'.format(device.container, device.fqdn)
MODULE_LOGGER.error(error_message)
self.__ansible.fail_json(msg=error_message)
try:
Expand Down

0 comments on commit 6ebfc91

Please sign in to comment.