\r
class AristaSDNConfigLet:\r
_configLet_SRIOV = """\r
-!# service: {}\r
-interface {}\r
+interface {interface}\r
+ !! service: {uuid}\r
switchport\r
switchport mode trunk\r
- switchport trunk group {}{}\r
+ switchport trunk group {service}{vlan_id}\r
!\r
"""\r
\r
def _get_sriov(self, uuid, interface, vlan_id, s_type, index):\r
- return self._configLet_SRIOV.format(uuid, interface, s_type, vlan_id)\r
+ return self._configLet_SRIOV.format(uuid=uuid, interface=interface, service=s_type, vlan_id=vlan_id)\r
\r
def getElan_sriov(self, uuid, interface, vlan_id, index):\r
return self._get_sriov(uuid, interface, vlan_id, "ELAN", index)\r
return self._get_sriov(uuid, interface, vlan_id, "ELINE", index)\r
\r
_configLet_PASSTROUGH = """\r
-!# service: {}\r
-interface {}\r
+interface {interface}\r
+ !! service: {uuid}\r
switchport\r
switchport mode access\r
- switchport access vlan {}\r
+ switchport access vlan {vlan_id}\r
!\r
"""\r
\r
def _get_passthrough(self, uuid, interface, vlan_id, s_type, index):\r
- return self._configLet_PASSTROUGH.format(uuid, interface, vlan_id)\r
+ return self._configLet_PASSTROUGH.format(uuid=uuid, interface=interface, vlan_id=vlan_id)\r
\r
def getElan_passthrough(self, uuid, interface, vlan_id, index):\r
return self._get_passthrough(uuid, interface, vlan_id, "ELAN", index)\r
return self._get_passthrough(uuid, interface, vlan_id, "ELINE", index)\r
\r
_configLet_VLAN = """\r
-!## service: {service} {vlan} {uuid}\r
vlan {vlan}\r
+ !! service: {service} {vlan} {uuid}\r
name {service}{vlan}\r
trunk group {service}{vlan}\r
trunk group MLAGPEER\r
return self._get_vlan(uuid, vlan_id, vni_id, "ELINE")\r
\r
_configLet_BGP = """\r
-!# service: {uuid}\r
router bgp {bgp}\r
vlan {vlan}\r
+ !! service: {uuid}\r
rd {loopback}:{vni}\r
route-target both {vni}:{vni}\r
redistribute learned\r
__OSM_PREFIX = "osm_"
__OSM_METADATA = "OSM_metadata"
__METADATA_PREFIX = '!## Service'
- __EXC_TASK_EXEC_WAIT = 1
- __ROLLB_TASK_EXEC_WAIT = 5
+ __EXC_TASK_EXEC_WAIT = 10
+ __ROLLB_TASK_EXEC_WAIT = 10
def __init__(self, wim, wim_account, config=None, logger=None):
"""
except Exception as ex:
try:
self.__rollbackConnection(cls_perSw,
- allLeafConfigured=True,
- allLeafModified=True)
+ allLeafConfigured,
+ allLeafModified)
except Exception as e:
self.logger.info("Exception rolling back in updating connection: {}".
format(e))
resp = self.client.api.update_configlet(
configlet['config'],
configlet['data']['key'],
- configlet['data']['name'])
+ configlet['data']['name'],
+ wait_task_ids=True)
elif to_create:
operation = 'create'
resp = self.client.api.add_configlet(