def get_sla_template_path(service_type=ServiceTypes.ASSET_ACCESS):
    """
    Get the template for a ServiceType.

    :param service_type: ServiceTypes
    :return: Path of the template, str
    """
    if service_type == ServiceTypes.ASSET_ACCESS:
        name = 'access_sla_template.json'
    elif service_type == ServiceTypes.CLOUD_COMPUTE:
        name = 'compute_sla_template.json'
    elif service_type == ServiceTypes.FITCHAIN_COMPUTE:
        name = 'fitchain_sla_template.json'
    else:
        raise ValueError(f'Invalid/unsupported service agreement type {service_type}')

    return os.path.join(os.path.sep, *os.path.realpath(__file__).split(os.path.sep)[1:-1], name)
def get_sla_template_path ( service_type = ServiceTypes . ASSET_ACCESS ) : if service_type == ServiceTypes . ASSET_ACCESS : name = 'access_sla_template.json' elif service_type == ServiceTypes . CLOUD_COMPUTE : name = 'compute_sla_template.json' elif service_type == ServiceTypes . FITCHAIN_COMPUTE : name = 'fitchain_sla_template.json' else : raise ValueError ( f'Invalid/unsupported service agreement type {service_type}' ) return os . path . join ( os . path . sep , * os . path . realpath ( __file__ ) . split ( os . path . sep ) [ 1 : - 1 ] , name )
Get the template for a ServiceType.

    :param service_type: ServiceTypes
    :return: Path of the template, str