fortinet-ansible-dev / ansible-galaxy-fortimanager-collection

GNU General Public License v3.0
16 stars 15 forks source link

fmgr_pkg_firewall_policy_sectionvalue not using correct proposed_method option #28

Closed Ralph3223 closed 2 years ago

Ralph3223 commented 3 years ago

The module fmgr_pkg_firewall_policy_sectionvalue uses the update_object function from the class NAPIManager. The update_object function only uses the proposed_method "update" because it is hardcoded in the function.

    def update_object(self, mvalue):
        url_updating = self._get_base_perobject_url(mvalue)
        if not self.top_level_schema_name:
            raise AssertionError('top level schema name MUST NOT be NULL')
        params = [{'url': url_updating, self.top_level_schema_name: self.__tailor_attributes(self.module.params[self.module_level2_name])}]
        response = self.conn.send_request('update', params)
        return response

The fortimanager API is expecting the "set" method for create section values in firewall policy's. Is it possible to use the proposed_method option with in de update_object function and make de "update" method the default?

Ralph3223 commented 2 years ago

This issue has been resolved in release 2.1.5.