For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Eduardo2021's avatar
Eduardo2021
Icon for Nimbostratus rankNimbostratus
Mar 14, 2022

Trying to Update F5 Fleet with Python Script

Hello Team,

Hope everything is fine, I have been working on F5 Python SDK for more than two years and now we have a new requirement to upgrade all load balancers using python,

I was able to make a script to get the volume/ upload image .

Now I am strugling with the upgrade part

 

I am getting this error 

Exception has occurred: TypeError
'Image' object is not callable

 

It seems that the library only has this class
 
class Images(Collection, CommandExecutionMixin):
    """BIG-IP® system software image collection."""
    def __init__(self, software):
        super(Images, self).__init__(software)
        self._meta_data['allowed_lazy_attributes'] = [Image]
        self._meta_data['attribute_registry'] = \
            {'tm:sys:software:image:imagestate': Image}
        self._meta_data['allowed_commands'].append('install')
        self._meta_data['required_command_parameters'].update((
            'name', 'volume'))
 
I would like to see how I can use the CommandExecutionMixin to appand the command "install" 
 
Any idea?