Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

request_id numbering schema? #8

Open
robertpenz opened this issue Dec 28, 2017 · 3 comments
Open

request_id numbering schema? #8

robertpenz opened this issue Dec 28, 2017 · 3 comments

Comments

@robertpenz
Copy link
Contributor

robertpenz commented Dec 28, 2017

I created an additional method which returns only one address group (could also be included in the main function, if name parameter is None you get everything, else only the specified group). Works so far, but where do I get the request_id number? I just added an 0 and it works, but there must be some schema. Can you please explain the request_id numbering please.

existing method:

    @login_required
    def get_firewall_address_groups(self, adom):
        '''
        Get all firewall adress groups defined for an ADOM
        '''
        request_id = 56227
        url = 'pm/config/adom/{}/obj/firewall/addrgrp'.format(adom)
        return self._get(url=url, request_id=request_id)

new method:

    @login_required
    def get_firewall_address_group(self, adom, addrgrp_name):
        '''
        Get all firewall adress groups defined for an ADOM
        '''
        request_id = 562270
        url = 'pm/config/adom/{}/obj/firewall/addrgrp/{}'.format(adom, addrgrp_name)
        return self._get(url=url, request_id=request_id)
@pschmitt
Copy link
Owner

I just used random numbers, that's all. IMHO the request_id field is a stupid "security feature" and makes no sense at all.

@robertpenz
Copy link
Contributor Author

hmm .. why not just generate a random number in the _request method?

@pschmitt
Copy link
Owner

That would work as well, yes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants