OpenIxia / BreakingPoint

Sample scripts for Breaking Point
MIT License
18 stars 11 forks source link

Port reservation > port mapping for network neighborhood interfaces #10

Closed eephillip closed 3 years ago

eephillip commented 3 years ago

Is there a way to effectively set the network neighborhood interface port mapping during the port reservation.

There doesn't appear to be an endpoint for setting this.

bpsv1
/api/v1/bps/ports/operations/reserve

bpsv2
/topology/operations/reserve
nutu commented 3 years ago

Hi, Not sure if this is what your are looking for but .... the order in which you reserve the ports dictates which Interface number will be used for a specific port. Example the 2nd port reserved will act as Interface 2, the 3rd Interface 3.. and so on. (This is exactly like in the UI) Is this what you were looking for?

eephillip commented 3 years ago

ahhh this is the key statement.

This is exactly like in the UI

Implying one at a time, click click click click.

If you pass a list object as requested by the function my assumption was that the order of that list would dictate the interface assignment. That doesn't appear to be the case.

    def _topology_operations_reserve(self, reservation, force=False):
        """
        :param reservation (list):
               list of object with fields
                      group (number):
                      slot (number):
                      port (number):
                      capture (bool):
        :param force (bool):
        """

If instead one sets the port reservation for each port individually (api call for each port) it works as expected.