mds_plugin/network.py
def list_load_balancers(**kwargs):
    """Lists load balancers

    This function will list all load balancers of the compartment with the
    given compartment_id.

    Args:
        **kwargs: Optional parameters

    Keyword Args:
        compartment_id (str): OCID of the parent compartment
        config (dict): An OCI config object or None
        config_profile (str): The name of an OCI config profile
        interactive (bool): Indicates whether to execute in interactive mode
        return_type (str): "STR" will return a formatted string, "DICT" will
            return the object converted to a dict structure and "OBJ" will
            return the OCI Python object for internal plugin usage
        raise_exceptions (bool): If set to true exceptions are raised

    Returns:
        Based on return_type
    """

    compartment_id = kwargs.get("compartment_id")
    config = kwargs.get("config")
    config_profile = kwargs.get("config_profile")

    interactive = kwargs.get("interactive", core.get_interactive_default())
    return_type = kwargs.get(
        "return_type", # In interactive mode, default to formatted str return
        core.RETURN_STR if interactive else core.RETURN_DICT)
    raise_exceptions = kwargs.get(
        "raise_exceptions", # On internal call (RETURN_OBJ), raise exceptions
        True if return_type == core.RETURN_OBJ else not interactive)

    try:
        config = configuration.get_current_config(
            config=config, config_profile=config_profile,
            interactive=interactive)
        compartment_id = configuration.get_current_compartment_id(
            compartment_id=compartment_id, config=config)

        import oci.exceptions
        try:
            # Initialize the  Object Store client
            load_balancer_cl = core.get_oci_load_balancer_client(config=config)

            # List the load balancers
            load_balancers = load_balancer_cl.list_load_balancers(
                compartment_id=compartment_id).data

            # Filter out all deleted items
            load_balancers = [
                l for l in load_balancers if l.lifecycle_state != "DELETED"]

            return core.oci_object(
                oci_object=load_balancers,
                return_type=return_type,
                format_function=format_load_balancer_listing)
        except oci.exceptions.ServiceError as e:
            if raise_exceptions:
                raise
            print(f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})')
    except Exception as e:
        if raise_exceptions:
            raise
        print(f'ERROR: {e}')
Lists load balancers

    This function will list all load balancers of the compartment with the
    given compartment_id.

    Args:
        **kwargs: Optional parameters

    Keyword Args:
        compartment_id (str): OCID of the parent compartment
        config (dict): An OCI config object or None
        config_profile (str): The name of an OCI config profile
        interactive (bool): Indicates whether to execute in interactive mode
        return_type (str): "STR" will return a formatted string, "DICT" will
            return the object converted to a dict structure and "OBJ" will
            return the OCI Python object for internal plugin usage
        raise_exceptions (bool): If set to true exceptions are raised

    Returns:
        Based on return_type
    
Lists load balancers
This function will list all load balancers of the compartment with the
given compartment_id.
Lists load balancers This function will list all load balancers of the compartment with the given compartment_id .
def list_load_balancers(**kwargs):
    compartment_id = kwargs.get("compartment_id")
    config = kwargs.get("config")
    config_profile = kwargs.get("config_profile")
    interactive = kwargs.get("interactive", core.get_interactive_default())
    return_type = kwargs.get(
        "return_type", 
        core.RETURN_STR if interactive else core.RETURN_DICT)
    raise_exceptions = kwargs.get(
        "raise_exceptions", 
        True if return_type == core.RETURN_OBJ else not interactive)
    try:
        config = configuration.get_current_config(
            config=config, config_profile=config_profile,
            interactive=interactive)
        compartment_id = configuration.get_current_compartment_id(
            compartment_id=compartment_id, config=config)
        import oci.exceptions
        try:
            load_balancer_cl = core.get_oci_load_balancer_client(config=config)
            load_balancers = load_balancer_cl.list_load_balancers(
                compartment_id=compartment_id).data
            load_balancers = [
                l for l in load_balancers if l.lifecycle_state != "DELETED"]
            return core.oci_object(
                oci_object=load_balancers,
                return_type=return_type,
                format_function=format_load_balancer_listing)
        except oci.exceptions.ServiceError as e:
            if raise_exceptions:
                raise
            print(f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})')
    except Exception as e:
        if raise_exceptions:
            raise
        print(f'ERROR: {e}')
def list_load_balancers ( ** kwargs ) : compartment_id = kwargs . get ( "compartment_id" ) config = kwargs . get ( "config" ) config_profile = kwargs . get ( "config_profile" ) interactive = kwargs . get ( "interactive" , core . get_interactive_default ( ) ) return_type = kwargs . get ( "return_type" , core . RETURN_STR if interactive else core . RETURN_DICT ) raise_exceptions = kwargs . get ( "raise_exceptions" , True if return_type == core . RETURN_OBJ else not interactive ) try : config = configuration . get_current_config ( config = config , config_profile = config_profile , interactive = interactive ) compartment_id = configuration . get_current_compartment_id ( compartment_id = compartment_id , config = config ) import oci . exceptions try : load_balancer_cl = core . get_oci_load_balancer_client ( config = config ) load_balancers = load_balancer_cl . list_load_balancers ( compartment_id = compartment_id ) . data load_balancers = [ l for l in load_balancers if l . lifecycle_state != "DELETED" ] return core . oci_object ( oci_object = load_balancers , return_type = return_type , format_function = format_load_balancer_listing ) except oci . exceptions . ServiceError as e : if raise_exceptions : raise print ( f'ERROR: {e.message}. (Code: {e.code}; Status: {e.status})' ) except Exception as e : if raise_exceptions : raise print ( f'ERROR: {e}' )
Lists load balancers
This function will list all load balancers of the compartment with the
given compartment_id.
Lists load balancers This function will list all load balancers of the compartment with the given compartment_id .
"""Lists load balancers

    This function will list all load balancers of the compartment with the
    given compartment_id.

    Args:
        **kwargs: Optional parameters

    Keyword Args:
        compartment_id (str): OCID of the parent compartment
        config (dict): An OCI config object or None
        config_profile (str): The name of an OCI config profile
        interactive (bool): Indicates whether to execute in interactive mode
        return_type (str): "STR" will return a formatted string, "DICT" will
            return the object converted to a dict structure and "OBJ" will
            return the OCI Python object for internal plugin usage
        raise_exceptions (bool): If set to true exceptions are raised

    Returns:
        Based on return_type
    """ # In interactive mode, default to formatted str return
 # On internal call (RETURN_OBJ), raise exceptions
 # Initialize the  Object Store client
 # List the load balancers
 # Filter out all deleted items

Based on return_type
Based on return_type
**kwargs
None