F5Networks / f5-ansible-f5os

Collection for managing F5OS based devices
2 stars 1 forks source link

f5os_device_info NoneType base_registration_key - f5-system-licensing:licensing restconf response changed? #4

Closed Zoda123 closed 11 months ago

Zoda123 commented 1 year ago

https://github.com/F5Networks/f5-ansible-f5os/blame/90d2520752c3deef0c3c24eb266347ccdd57af80/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py#L955

This line is giving the following error: "/tmp/ansible_f5os_device_info_payload_eej88h_x/ansible_f5os_device_info_payload.zip/ansible_collections/f5networks/f5os/plugins/modules/f5os_device_info.py", line 956, in base_registration_key TypeError: 'NoneType' object is not subscriptable

When running:

    - name: "Collect F5OS facts"
      f5os_device_info:
        gather_subset:
          - all

Against a Base OS Version: 1.5.0-5781. In this version the registration-key looks to be part of 'state' object and not 'config'

Possible Solution:

    @property
    def base_registration_key(self):
        return self._values['state']['registration-key']['base']
        #return self._values['config']['registration-key']['base']

    @property
    def dossier(self):
        return {}
        #return self._values['config']['dossier']

Same kind of issue happens for 'dossier' looks like the restconf response for url /restconf/data/openconfig-system:system/f5-system-licensing:licensing Doesn't return 'dossier' anymore?

pgouband commented 1 year ago

Hi,

Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1308.

wojtek0806 commented 11 months ago

fixed in 1.4.0 (release this week) closing