kaisero / fireREST

Python library for interacting with Cisco Firepower Management Center REST API
GNU General Public License v3.0
70 stars 49 forks source link

the get_policy method errors out when passing "params" #3

Closed sudseh closed 4 years ago

sudseh commented 6 years ago

It doesn't seem as if the "expanded" flag is permitted for the get_policy method in api 6.2.3. I have been using the following code block instead:

#def get_policy(self, policy_id, policy_type, expanded=False):
def get_policy(self, policy_id, policy_type):
        request = '/policy/{0}/{1}'.format(policy_type, policy_id)
#        params = {
#          'expanded': expanded
#       }
        url = self._url('config', request)
        return self._get(url)
#        return self._get(url, params)
kaisero commented 6 years ago

Thanks for the report, I will look into it this week and implement a fix in the develop branch.

sudseh commented 6 years ago

Cool cool, thanks!

Cheers, Sudhir

On Wed, May 16, 2018, 10:27 Oliver Kaiser notifications@github.com wrote:

Thanks for the report, I will look into it this week and implement a fix in the develop branch.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kaisero/fireREST/issues/3#issuecomment-389538775, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGjqECKPHVvREy4-YQLgjlmHaX5tciJks5tzDdKgaJpZM4T-s8- .

kaisero commented 4 years ago

Looks like this has been fixed upstream. Tested expanded param with FPR 6.4.0.x without any issues, therefore there will be no changes to the function