HEX
Server: LiteSpeed
System: Linux s3512.bom1.stableserver.net 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: surajaut (1797)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/vultr/v1_os.py
'''Partial class to handle Vultr OS API calls'''
from .utils import VultrBase


class VultrOS(VultrBase):
    '''Handles Vultr OS API calls'''
    def __init__(self, api_key):
        VultrBase.__init__(self, api_key)

    def list(self, params=None):
        ''' /v1/os/list
        GET - public
        Retrieve a list of available operating systems. If
        the 'windows' flag is true, a Windows licenses will
        be included with the instance, which will increase the cost.

        Link: https://www.vultr.com/api/#os_os_list
        '''
        params = params if params else dict()
        return self.request('/v1/os/list', params, 'GET')