Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Trying to Update F5 Fleet with Python Script

Eduardo2021
Nimbostratus
Nimbostratus

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?
1 REPLY 1

Hello Eduardo2021.

Actually, there exist a python implementation through ansible, which is easy to use and recommended by F5.

https://support.f5.com/csp/article/K89192130

 

Regards,
Dario.