← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2037596] [NEW] Description Failed to invoke the API interface to obtain the address group list

 

Public bug reported:

Call API interface:
    GET /v2.0/address_groups   

Exception log:    
2023-09-28 09:05:07.951 182 ERROR futurist.periodics   File "/var/lib/kolla/venv/lib/python3.6/site-packages/neutron/db/address group db.py", line 174, in get_address_groups
2023-09-28 09:05:07.951 182 ERROR futurist.periodics   context, _pager=pager,**filters)
2023-09-28 09:05:07.951 182 ERROR futurist.periodics   TypeError: get_objects() argument after ** must be a mapping, not NoyeType 
2023-09-28 09:05:07.951 182 ERROR futurist.periodics

View code:
    ...
    def get_address_groups(self, context, filters=None, fields=None,
                           sorts=None, limit=None, marker=None,
                           page_reverse=False):
        pager = base_obj.Pager(sorts, limit, page_reverse, marker)
        address_groups = ag_obj.AddressGroup.get_objects(
            context, _pager=pager, **filters)

solution:
You need to add that you can judge whether the filters are None before using **filters

Add code:
     filters = filters or {}

** Affects: neutron
     Importance: Undecided
     Assignee: Reason li (lireason)
         Status: In Progress

** Changed in: neutron
     Assignee: (unassigned) => Reason li (lireason)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2037596

Title:
  Description Failed to invoke the API interface to obtain the address
  group list

Status in neutron:
  In Progress

Bug description:
  Call API interface:
      GET /v2.0/address_groups   

  Exception log:    
  2023-09-28 09:05:07.951 182 ERROR futurist.periodics   File "/var/lib/kolla/venv/lib/python3.6/site-packages/neutron/db/address group db.py", line 174, in get_address_groups
  2023-09-28 09:05:07.951 182 ERROR futurist.periodics   context, _pager=pager,**filters)
  2023-09-28 09:05:07.951 182 ERROR futurist.periodics   TypeError: get_objects() argument after ** must be a mapping, not NoyeType 
  2023-09-28 09:05:07.951 182 ERROR futurist.periodics

  View code:
      ...
      def get_address_groups(self, context, filters=None, fields=None,
                             sorts=None, limit=None, marker=None,
                             page_reverse=False):
          pager = base_obj.Pager(sorts, limit, page_reverse, marker)
          address_groups = ag_obj.AddressGroup.get_objects(
              context, _pager=pager, **filters)

  solution:
  You need to add that you can judge whether the filters are None before using **filters

  Add code:
       filters = filters or {}

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2037596/+subscriptions



Follow ups