You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is a problem in the following function code in controller_bcf.py :
def segment(self, name, tenant, interface_groups=[], origination='', action='add'):
path = '/tenant[name="%s"]/segment[name="%s"]?select=name&single=true' % (tenant, name)
response = self.make_request('GET', path, data='{}')
config_present = True if response.status_code != 404 else False
path = '/tenant[name="%s"]/segment[name="%s"]' %(tenant, name)
data = '{"name": "%s", "origination": "%s"}' % (name, origination)
if action == 'add' and not config_present:
response = self.make_request('PUT', path, data=data)
elif action != 'add' and config_present:
return self.make_request('DELETE', path, data=data)
if interface_groups:
for interface_group, vlan in interface_groups:
result = self.interface_group_segment_membership(interface_group, name, tenant, vlan=vlan)
How am I supposed to add a new segment in one or more interface groups when calling this function ? The interface_groups=[] variable seems to be a list so how the following could work :
if interface_groups:
for interface_group, vlan in interface_groups:
result = self.interface_group_segment_membership(interface_group, name, tenant, vlan=vlan)
Regards.
The text was updated successfully, but these errors were encountered:
Hello,
I think there is a problem in the following function code in controller_bcf.py :
How am I supposed to add a new segment in one or more interface groups when calling this function ? The interface_groups=[] variable seems to be a list so how the following could work :
Regards.
The text was updated successfully, but these errors were encountered: