Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/module_utils/oracle/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyo

�
�Udac	@@s9ddlmZddlZddlZddlZddlZddlmZddlmZddl	Z	y�ddl
Z
ddlZddlm
Z
ddlmZmZmZmZmZmZddlmZddlmZdd	lmZdd
lmZddlmZmZeZ Wne!k
r;e"Z nXddl#m$Z$dd
l%m&Z&dZ'dZ(dddddddddg	Z)dddddddd gZ*dddgZ+e"e"d!�Z,e"d"�Z-dd#�Z/d$�Z0d%�Z1d&�Z2d'�Z3d(�Z4d)�Z5d*�Z6d+�Z7d,d-�Z8d.�Z9ddedd/�Z:dd0�Z;d1�Z<d2�Z=d3�Z>e"e"d4�Z?d5�Z@d6�ZAdddded7�ZBd8�ZCd9�ZDd:�ZEd;�ZFdd<�ZGd=�ZHd>�ZId?�ZJd@�ZKdA�ZLdB�ZMdC�ZNdeddD�ZOdeddE�ZPe"ddF�ZQddG�ZRdH�ZSdee"dI�ZTdJ�ZUdK�ZVdL�ZWdM�ZXdN�ZYdO�ZZdP�Z[dQ�Z\dR�Z]ddS�Z^dddT�Z_dU�Z`dV�ZadW�ZbdX�Zce"dY�Zde"dZ�Zed[�Zfdd\�ZgdS(]i(tabsolute_importN(tdatetime(teq(tHEADER_NEXT_PAGE(t
InvalidConfigtInvalidPrivateKeytMissingPrivateKeyPassphrasetConfigFileNotFoundtServiceErrortMaximumWaitTimeExceeded(tIdentityClient(tCreateBucketDetails(tUpdateBucketDetails(tRetryStrategyBuilder(tto_dicttSentinel(tto_bytes(t	iteritemss	1.6.0-devi�tTERMINATINGt
TERMINATEDtFAULTYtFAILEDtDELETINGtDELETEDtUNKNOWN_ENUM_VALUEt	DETACHINGtDETACHEDt	AVAILABLEtACTIVEtRUNNINGtPROVISIONEDtATTACHEDtASSIGNEDt	SUCCEEDEDtPENDING_PROVIDERcC@sAtdtdd�dtdddd�dtdd�dtddd	t�d
tdd�dtddd	t�dtddd
tdddgdd�dtdd�dtdd��	}|r�|jdtdd�dtdddt��n|r=|jdtdddt�dtdddt�dtdd��n|S(s[
    Return the common set of module arguments for all OCI cloud modules.
    :param supports_create: Variable to decide whether to add options related to idempotency of create operation.
    :param supports_wait: Variable to decide whether to add options related to waiting for completion.
    :return: A dict with applicable module options.
    tconfig_file_locationttypetstrtconfig_profile_nametdefaulttDEFAULTtapi_usertapi_user_fingerprinttno_logtapi_user_key_filetapi_user_key_pass_phraset	auth_typetrequiredtchoicestapi_keytinstance_principalttenancytregiontkey_bytlisttforce_createtbooltwaittwait_timeouttintt
wait_until(tdicttTruetFalsetupdatetMAX_WAIT_TIMEOUT_IN_SECONDS(tsupports_createt
supports_waittcommon_args((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_common_arg_specLs2			cC@sHt�}|r+|jdtdd��n|jdtdd��|S(NtnameR$R%tdisplay_name(RER@R=(tfilter_by_nametfacts_module_arg_spec((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_facts_module_arg_speczs
	c
	C@s�i}|jjd�}tdj|��|sdtjkrctjd}tdj|��qd}tdj|��n|jjd�}|s�dtjkr�tjd}q�d	}nytjjd
|d|�}Wn]t	t
ttfk
r=}t
|�s!|jdt|��q>td
jt|���nXdjt�|d<t||dddddd�t||dddddd�t||dddddd�t||dddddd�t||dddd dd�t||dd!dd"dd!�|jjd#t�p/tjjd$�}|tkr�|r�td%j|d!��t|�}|j|d�j}g|D]}	|	jtkr�|	j^q�\|d!<td&j|d!��n|S('s�Return the OCI configuration to use for all OCI API calls. The effective OCI configuration is derived by merging
    any overrides specified for configuration attributes through Ansible module options or environment variables. The
    order of precedence for deriving the effective configuration dict is:
    1. If a config file is provided, use that to setup the initial config dict.
    2. If a config profile is specified, use that config profile to setup the config dict.
    3. For each authentication attribute, check if an override is provided either through
        a. Ansible Module option
        b. Environment variable
        and override the value in the config dict in that order.R#s)Config file through module options - {0} tOCI_CONFIG_FILEs>Config file through OCI_CONFIG_FILE environment variable - {0}s
~/.oci/configsConfig file (fallback) - {0} R&tOCI_CONFIG_PROFILER(t
file_locationtprofile_nametmsgs8Ignore {0} as the auth_type is set to instance_principalsOracle-Ansible/{0}tadditional_user_agenttmodule_option_nameR)tenv_var_nametOCI_USER_IDtconfig_attr_nametuserR*tOCI_USER_FINGERPRINTtfingerprintR,tOCI_USER_KEY_FILEtkey_fileR-tOCI_USER_KEY_PASS_PHRASEtpass_phraseR3tOCI_TENANCYR4t
OCI_REGIONtdo_not_redirect_to_home_regiont+OCI_IDENTITY_DO_NOT_REDIRECT_TO_HOME_REGIONs*Region passed for module invocation - {0} s2Setting region in the config to home region - {0} (tparamstgett_debugtformattostenvirontocitconfigt	from_fileRRRRt_is_instance_principal_autht	fail_jsonR%t__version__t_merge_auth_optionR?R
tlist_region_subscriptionstdatatis_home_regionR>tregion_name(
tmoduletservice_client_classRgtconfig_filetconfig_profiletextdo_not_redirecttidentity_clienttregion_subscriptionstrs((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_oci_config�s�


	
	2c	C@s�t||�}i}t|�rytjjj�}Wn8tk
rq}djt|��}|j	d|�nX||d<nytj
j||�Wn8tjj
k
r�}|j	ddjt|���nX|||�}|S(s(
    Creates a service client using the common module options provided by the user.
    :param module: An AnsibleModule that represents user provided options for a Task
    :param service_client_class: A class that represents a client to an OCI Service
    :return: A fully configured client
    s�Failed retrieving certificates from localhost. Instance principal based authentication is onlypossible from within OCI compute instances. Exception: {0}ROtsigners)Invalid OCI configuration. Exception: {0}(RzRiRftauthtsignerst%InstancePrincipalsSecurityTokenSignert	ExceptionRcR%RjRgtvalidate_configt
exceptionsR(	RqRrRgtkwargsR{Rutmessagetictclient((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytcreate_service_clients"
	cC@sQd|jko|jddk}|sMdtjkoGtjddk}n|S(NR.R2tOCI_ANSIBLE_AUTH_TYPE(R`RdRe(Rqtinstance_principal_auth((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRi&scC@s�tdj|��|jj|�}tdj||��|sy|tjkrytj|}tdj||��qyn|r�tdj||��|ji||6�ndS(s�Merge the values for an authentication attribute from ansible module options and
    environment variables with the values specified in a configuration filesMerging {0}s!	 Ansible module option {0} = {1}s 	 Environment variable {0} = {1}s%Updating config attribute {0} -> {1} N(RbRcR`RaRdReR@(RgRqRQRRRTtauth_attribute((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRl4s

cC@szd}|dkrt�}n|dkr6t�}n|jd|_|jd|_|jd|_|jd|_|S(NtcreateR@tcompartment_idRFtpublic_access_typetmetadata(tNoneRRR`R�RFR�R�(tbucket_details_typeRqtbucket_details((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytbucket_details_factoryRscC@sb|s
|Sg}|jg|D]:}|j�D]'\}}t||�|kr-|^q-q�|S(N(textendtitemstgetattr(t
all_resourcest
filter_paramstfiltered_resourcestresourcetkeytvalue((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytfilter_resourcesas
%cK@sd}yt||�}Wn�tk
r�}dt|�kr�d|krq|drgi|dd6}n|d=q�d|kr�|dr�i|dd6}n|d=q�nt||�}nX|j}xE|jr|jd|jjt	��t||�}||j7}q�Wt
||�S(s:
    Return all resources after paging through all results returned by target_fn. If a `display_name` or `name` is
    provided as a kwarg, then only resources matching the specified name are returned.
    :param target_fn: The target OCI SDK paged function to call
    :param kwargs: All arguments that the OCI SDK paged function expects
    :return: List of all objects returned by target_fn
    :raises ServiceError: When the Service returned an Error response
    :raises MaximumWaitTimeExceededError: When maximum wait time is exceeded while invoking target_fn
    sunknown kwargsRGRFtpageN(R�tcall_with_backofft
ValueErrorR%Rnt
has_next_pageR@theadersRaRR�(t	target_fnR�R�tresponseRutexisting_resources((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytlist_all_resourcesps(




	cC@std�j|�dS(Nt	oci_utils(t
get_loggertdebug(ts((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRb�scC@st�}|j|�S(N(t
setup_loggingt	getLogger(tmodule_nametoci_logging((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR��s	tINFOcC@s�d}d}tj�}tj||�}tj||�}tj|�}tjj|d�}tjd|ddd|�tS(sSetup logging configurationtLOG_PATHt	LOG_LEVELsoci_ansible_module.logtfilenametfilemodetatlevel(	ttempfilet
gettempdirRdtgetenvtloggingtgetLevelNametpathtjointbasicConfig(t
default_leveltenv_log_patht
env_log_leveltdefault_log_pathtlog_patht
log_level_strt	log_levelt
log_file_path((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR��scC@sI|dk	r5t||�r5t}|j||�n|j||�|S(s�
    This function checks the difference between two resource attributes of literal types and sets the attrbute
    value in the target instance type holding the attribute.
    :param target_instance: The instance which contains the attribute whose values to be compared
    :param attr_name: Name of the attribute whose value required to be compared
    :param input_value: The value of the attribute provided by user
    :param existing_value: The value of the attribute in the existing resource
    :param changed: Flag to indicate whether there is any difference between the values
    :return: Returns a boolean value indicating whether there is any difference between the values
    N(R�RR>t__setattr__(ttarget_instancet	attr_nametinput_valuetexisting_valuetchanged((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytcheck_and_update_attributes�s

c	C@s�y�tdt�}t||||�\}
}|
r�t|
||||	�}t||�j}|
r�|dkr�|jdd�nt||t	||d||�}nt	|d<nt
|�||<|SWn&tk
r�}|jd|j�nXdS(s
    This function handles update operation on a resource. It checks whether update is required and accordingly returns
    the resource and the changed status.
    :param wait_applicable: Indicates if the resource support wait
    :param client:  The resource Client class to use to perform the wait checks. This param must be specified if
            wait_applicable is True
    :param resource_type: The type of the resource. e.g. "private_ip"
    :param get_fn: Function used to get the resource. e.g. virtual_network_client.get_private_ip
    :param kwargs_get: Dictionary containing the arguments to be used to call get function.
           e.g. {"private_ip_id": module.params["private_ip_id"]}
    :param update_fn: Function used to update the resource. e.g virtual_network_client.update_private_ip
    :param primitive_params_update: List of primitive parameters used for update function. e.g. ['private_ip_id']
    :param kwargs_non_primitive_update: Dictionary containing the non-primitive arguments to be used to call get
     function with key as the non-primitive argument type & value as the name of the non-primitive argument to be passed
     to the update function. e.g. {UpdatePrivateIpDetails: "update_private_ip_details"}
    :param module: Instance of AnsibleModule
    :param update_attributes: Attributes in update model.
    :param states: List of lifecycle states to watch for while waiting after create_fn is called.
                   e.g. [module.params['wait_until'], "FAULTY"]
    :param sub_attributes_of_update_model: Dictionary of non-primitive sub-attributes of update model. for example,
        {'services': [ServiceIdRequestDetails()]} as in UpdateServiceGatewayDetails.
    :return: Returns a dictionary containing the "changed" status and the resource.
    R�ROs5wait_applicable is True, but client is not specified.N(
R=R?tget_attr_to_updatetget_kwargs_updateR�RnR�Rjt!wait_for_resource_lifecycle_stateR>RRR�(t
resource_typetget_fnt
kwargs_gett	update_fntprimitive_params_updatetkwargs_non_primitive_updateRqtupdate_attributesR�tsub_attributes_of_update_modeltwait_applicabletstatestresulttattributes_to_updateR�t
kwargs_updateRu((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytcheck_and_update_resource�s.&		
!
c	C@s�t�}x|D]}|j|||<qWx�|D]�}|�}x`|jD]U}||krK|r�||kr�t||||�q�t|||j|�qKqKW||||<q2W|S(N(R=R`t
attribute_maptsetattr(	R�R�RqR�R�R�tparamt
update_objectR�((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR�s	

	cC@s-x&|D]}||||krtSqWtS(s
    This function checks if `sub` dictionary is a subset of `super` dictionary.
    :param sub: subset dictionary, for example user_provided_attr_value.
    :param super_dict: super dictionary, for example resources_attr_value.
    :return: True if sub is contained in super.
    (R?R>(tsubt
super_dictR�((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytis_dictionary_subsets
c
C@sH|dkr|dkrtS|dkr:t|�dksp|dkrXt|�dkspt|�t|�krttSt|�dkr�tSt|�}t|�}t|d�tkrt|�}t|�}x1t|�D]#\}}t	|||�s�tSq�WtSy"x|D]}|j
|�qWWntk
r>tSX|SdS(Ni(R�R>tlenR?RR$R=tsort_list_of_dictionaryt	enumerateR�tremoveR�(R�tttsorted_stsorted_ttindextdtelem((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytare_lists_equal,s*T

cC@syt||�j}Wn&tk
r>}|jd|j�nXg}x�|D]�}t||d�}|jj|d�}	t	|�t
ks�t	|	�t
ko�t|	|�}
t	|�t
ko�t|�t|	�k}|
s�|rL|jj|d�r|j
|�qqLqLW||fS(NRO(R�RnRRjR�R�R�R`RaR$R6R�Rtappend(R�R�RqR�R�RuR�tattrtresources_attr_valuetuser_provided_attr_valuetunequal_list_attrtunequal_attr((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR�Ns"
$cC@sAt||�}|jtdtdd�dtdd���|S(s�
    Returns an arg_spec that is valid for taggable OCI resources.
    :return: A dict that represents an ansible arg spec that builds over the common_arg_spec and adds free-form and
    defined tags.
    t
freeform_tagsR$R=tdefined_tags(RER@R=(RBRCttag_arg_spec((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_taggable_arg_specjs(cC@s:|jjdd�}|jjdd�}t|||�S(s[
    Adds free-form and defined tags from an ansible module to a resource model
    :param model: A resource model instance that supports 'freeform_tags' and 'defined_tags' as attributes
    :param module: An AnsibleModule representing the options provided by the user
    :return: The updated model class with the tags specified by the user.
    R�R�N(R`RaR�tadd_tags_to_model_class(tmodelRqR�R�((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytadd_tags_to_model_from_modulewscC@s�yn|dk	r8tdj||��|jd|�n|dk	rmtdj||��|jd|�nWn)tk
r�}tdj||��nX|S(s�
    Add free-form and defined tags to a resource model.
    :param model:  A resource model instance that supports 'freeform_tags' and 'defined_tags' as attributes
    :param freeform_tags:  A dict representing the freeform_tags to be applied to the model
    :param defined_tags: A dict representing the defined_tags to be applied to the model
    :return: The updated model class with the tags specified by the user
    s"Model {0} set freeform tags to {1}R�s!Model {0} set defined tags to {1}R�s)Model {0} doesn't support tags. Error {1}N(R�RbRcR�tAttributeError(R�R�R�tae((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR��scC@s/|jjdd�r;tdj|��t||�}|S|dkrPi}n|
dkrei}
ny5|dkr�|r�d|d<nt||�}nWn�tk
r�|jdd�yt||�}Wqt	k
r�}
|j
d|
j�qXn&t	k
r}
|j
d|
j�nXt�}t
|||�}d|
krSi|
d<nd}tdjt|���xm|D]e}t||	�rytdj|jt|���tt|�||||
�r�t|�}Pq�qyqyW|rtd	j|��|||<t|d
<ntd�t||�}|S(
s
    This function checks whether there is a resource with same attributes as specified in the module options. If not,
    it creates and returns the resource.
    :param resource_type: Type of the resource to be created.
    :param create_fn: Function used in the module to handle create operation. The function should return a dict with
                      keys as resource & changed.
    :param kwargs_create: Dictionary of parameters for create operation.
    :param list_fn: List function in sdk to list all the resources of type resource_type.
    :param kwargs_list: Dictionary of parameters for list operation.
    :param module: Instance of AnsibleModule
    :param model: Model used to create a resource.
    :param exclude_attributes: The attributes which should not be used to distinguish the resource. e.g. display_name,
     dns_label.
    :param dead_states: List of states which can't transition to any of the usable states of the resource. This deafults
    to ["TERMINATING", "TERMINATED", "FAULTY", "FAILED", "DELETING", "DELETED", "UNKNOWN_ENUM_VALUE"]
    :param default_attribute_values: A dictionary containing default values for attributes.
    :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True}
    R7sForce creating {0}tTIMECREATEDtsort_byROR�s4Trying to find a match within {0} existing resourcessMComparing user specified values {0} against an existing resource's values {1}s)Resource with same attributes found: {0}.R�s@No matching resource found. Attempting to create a new resource.N(R`RaR�RbRcR�R�R�tpopRRjR�R=t_get_attributes_to_considerR�t_is_resource_activeRt(does_existing_resource_match_user_inputsR?(R�t	create_fnt
kwargs_createtlist_fntkwargs_listRqR�R�texclude_attributestdead_statestdefault_attribute_valuestsupports_sort_by_time_createdR�Rutattributes_to_considertresource_matchedR�((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytcheck_and_create_resource�sd!		

	

		


cC@s�d|jkr2|jddk	r2|jd}nGt|j�}d|kr]|jd�nd|kry|jd�ntdj|��|S(s�
    Determine the attributes to detect if an existing resource already matches the requested resource state
    :param exclude_attributes: Attributes to not consider for matching
    :param model: The model class used to create the Resource
    :param module: An instance of AnsibleModule that contains user's desires around a resource's state
    :return: A list of attributes that needs to be matched
    R5R�t
node_countsattributes to consider: {0}N(R`R�R6R�R�RbRc(RR�RqR((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR�s"cC@s5|dkrt}nd|jkr(tS|j|kS(Ntlifecycle_state(R�tDEAD_STATESR�R>R(R�R((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRs
	cC@s�|s
tS||kr�|j|d�}t|t�r�|sB|Si}x9t|j��D]%\}}||kr[|||<q[q[W||kS||kStSdS(N(R?RaR�t
isinstanceR=RR�R>(R	R�tassigned_valuetdefault_val_for_attrtkeystktv((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytis_attr_assigned_default s

cC@s�tdt�}yJtt||�j�}tdj||��t|d<|||<|SWn/tt	fk
r�}|j
dt|��nXdS(sk
    Create an OCI resource
    :param resource_type: Type of the resource to be created. e.g.: "vcn"
    :param create_fn: Function in the SDK to create the resource. e.g. virtual_network_client.create_vcn
    :param kwargs_create: Dictionary containing arguments to be used to call the create function create_fn
    :param module: Instance of AnsibleModule
    R�sCreated {0}, {1}RON(R=R?RR�RnRbRcR>Rt	TypeErrorRjR%(R�RRRqR�R�Ru((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytcreate_resource;s

cC@s]|si}nxG|D]?}d}||kr<||}t||�}|dk	r�tg}	t||||||	�|	ds9tdj|||��tSqU|j|�dkrU|dk	rU|jj|�r9|jj|�}|jdd�}
|
dk	r|||
kr3tSq6t	||||�s6tSq9qUqtdj||j
��qWtS(s�
    Check if 'attributes_to_compare' in an existing_resource match the desired state provided by a user in 'module'.
    :param existing_resource: A dictionary representing an existing resource's values.
    :param module: The AnsibleModule representing the options provided by the user.
    :param attributes_to_compare: A list of attributes of a resource that are used to compare if an existing resource
                                    matches the desire state of the resource expressed by the user in 'module'.
    :param exclude_attributes: The attributes, that a module author provides, which should not be used to match the
        resource. This dictionary typically includes: (a) attributes which are initialized with dynamic default values
        like 'display_name', 'security_list_ids' for subnets and (b) attributes that don't have any defaults like
        'dns_label' in VCNs. The attributes are part of keys and 'True' is the value for all existing keys.
    :param default_attribute_values: A dictionary containing default values for attributes.
    :return: True if the values for the list of attributes is the same in the existing_resource and module instances.
    isZMismatch on attribute '{0}'. User provided value is {1} & existing resource's valueis {2}.R'sfAttribute {0} is in the create model of resource {1}but doesn't exist in the get model of the resourceN(R�t_get_user_provided_valueR>t*check_if_user_value_matches_resources_attrRbRcR?Rat
argument_specRt	__class__(texisting_resourceRqtattributes_to_compareRR	R�tattribute_with_default_metadatatresources_value_for_attrtuser_provided_value_for_attrtrestdefault_attribute_value((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRNsJ	

	

cC@sJg}tt|j���}x%|D]}t||�tkr�||r�t||d�tkr�g}x%||D]}|jt|��qvW|j|dk||f�qB|j||dk|||f�q%t||�tkrt||�}|j|dk||f�q%|j||dk|||f�q%W|S(s�
    This function takes a dictionary and converts it to a list of tuples recursively.
    :param d: A dictionary.
    :return: List of tuples.
    iN(tsortedR6RR$R=R�ttuplizeR�(R�tlist_of_tuplestkey_listR�t
sub_tuplestsub_dictttupled_value((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR&�s
$'(cC@st|�}|S(N(R&(R�ttuple_form_of_d((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_key_for_comparing_dict�scC@s�i}x�|D]�}t||�tkr�||rjt||d�tkrjt||�}|||<q�t||�||<q
t||�tkr�t||�||<q
||||<q
W|S(s�
    This function sorts values of a dictionary recursively.
    :param d: A dictionary.
    :return: Dictionary with sorted elements.
    i(R$R6R=R�R%tsort_dictionary(R�tsorted_dR�tsorted_value((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR.�s
$
cC@s@g}x'|D]}t|�}|j|�q
Wt|dt�S(s-
    This functions sorts a list of dictionaries. It first sorts each value of the dictionary and then sorts the list of
    individually sorted dictionaries. For sorting, each dictionary's tuple equivalent is used.
    :param list_of_dict: List of dictionaries.
    :return: A sorted dictionary.
    R�(R.R�R%R-(tlist_of_dicttlist_with_sorted_dictR�R/((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR��s

cC@s]t|j|�t�r*|j|�}nt|j|�t�rT|j|�}nt|t�srt|t�r�|j|�r�dS|dkr�|j|�dk	r�|j|�}n|dkr�|dkr�dS|dkr�t|�dks|dkrt|�dkrt|d<dS|dk	r\|dk	r\t|�t|�kr\t|d<dS|r�t|d�tkr�t|�}t|�}nt	|�}t	|�}x�t
|�D])\}}	t||	|||||�q�Wnqt|t�r�|r|rt|d<nxE|D]�}
|dk	r^|r^t|
|j|
�|j|
�|||�q|j|
�dkr|j|
�dk	r�|j|
�}t|
|j|
�||||�q�t|||j|
��|d<qqWnt||krY|j|�dkr=|j|�dk	r=t|||�sVt|d<qVqY|dk	rYt|d<qYndS(Ni(
RRaR=R6R�R�R?R$R�R%R�RR(tattribute_nameR!R"RR	R#t#sorted_user_provided_value_for_attrtsorted_resources_value_for_attrR�tresources_value_for_attr_partR�((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR�s�

	




 c
C@s�|st|||�S|r'|r'tSx�|D]�}||kr�||||kr�tdj|||||j|d���tSq.t|||�s.|j|d�}|r�t||||�s�tSq�tdj||||��q.q.WtS(NsiFailed to match: Existing resource's attr {0} sub-attr {1} value is {2}, while user provided value is {3}sConsider as match: Existing resource's attr {0} sub-attr {1} value is {2}, while user didnot provide a value for it. The module author also has not provided a default value for itor marked it for exclusion. So ignoring this attribute during matching and continuing withother checks(RR?RbRcRaR�tshould_dict_attr_be_excludedR>(toption_nametexisting_resource_dicttuser_provided_dicttexclude_listR	tsub_attrtdefault_value_for_dict_attr((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytare_dicts_equales8



cC@sJxC|D];}t|t�r||krB|||kr?tSqBqqWtS(sKAn entry for the Exclude list for excluding a map's key is specifed as a dict with the map option name as the
    key, and the value as a list of keys to be excluded within that map. For example, if the keys "k1" and "k2" of a map
    option named "m1" needs to be excluded, the exclude list must have an entry {'m1': ['k1','k2']} (RR=R>R?(tmap_option_namet
option_keyR;texclude_item((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR7�s
c
C@s~y)t||||||||||	�
SWnNtk
rT}
|jdt|
��n&tk
ry}
|jd|
j�nXdS(s�
    A utility function to create a resource and wait for the resource to get into the state as specified in the module
    options.
    :param wait_applicable: Specifies if wait for create is applicable for this resource
    :param resource_type: Type of the resource to be created. e.g. "vcn"
    :param client: OCI service client instance to call the service periodically to retrieve data.
                   e.g. VirtualNetworkClient()
    :param create_fn: Function in the SDK to create the resource. e.g. virtual_network_client.create_vcn
    :param kwargs_create: Dictionary containing arguments to be used to call the create function create_fn.
    :param get_fn: Function in the SDK to get the resource. e.g. virtual_network_client.get_vcn
    :param get_param: Name of the argument in the SDK get function. e.g. "vcn_id"
    :param module: Instance of AnsibleModule.
    :param states: List of lifecycle states to watch for while waiting after create_fn is called.
                   e.g. [module.params['wait_until'], "FAULTY"]
    :param kwargs_get: Dictionary containing arguments to be used to call a multi-argument `get` function
    :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True}
    RON(t"create_or_update_resource_and_waitR	RjR%RR�(R�R�RRR�t	get_paramRqR�R�R�Ru((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytcreate_and_wait�s c
C@s�y,t|||||||||d|	�	SWnNtk
rW}
|jdt|
��n&tk
r|}
|jd|
j�nXdS(sf
    A utility function to update a resource and wait for the resource to get into the state as specified in the module
    options. It wraps the create_and_wait method as apart from the method and arguments, everything else is similar.
    :param wait_applicable: Specifies if wait for create is applicable for this resource
    :param resource_type: Type of the resource to be created. e.g. "vcn"
    :param client: OCI service client instance to call the service periodically to retrieve data.
                   e.g. VirtualNetworkClient()
    :param update_fn: Function in the SDK to update the resource. e.g. virtual_network_client.update_vcn
    :param kwargs_update: Dictionary containing arguments to be used to call the update function update_fn.
    :param get_fn: Function in the SDK to get the resource. e.g. virtual_network_client.get_vcn
    :param get_param: Name of the argument in the SDK get function. e.g. "vcn_id"
    :param module: Instance of AnsibleModule.
    :param kwargs_get: Dictionary containing arguments to be used to call the get function which requires multiple arguments.
    :param states: List of lifecycle states to watch for while waiting after update_fn is called.
                   e.g. [module.params['wait_until'], "FAULTY"]
    :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True}
    R�RON(RBR	RjR%RR�(R�R�R�R�R�RCRqR�R�R�Ru((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytupdate_and_wait�s c

C@sKt||||�}||}t||||
|||||�	||<|S(s�
    A utility function to create or update a resource and wait for the resource to get into the state as specified in
    the module options.
    :param resource_type: Type of the resource to be created. e.g. "vcn"
    :param function: Function in the SDK to create or update the resource.
    :param kwargs_function: Dictionary containing arguments to be used to call the create or update function
    :param module: Instance of AnsibleModule.
    :param wait_applicable: Specifies if wait for create is applicable for this resource
    :param get_fn: Function in the SDK to get the resource. e.g. virtual_network_client.get_vcn
    :param get_param: Name of the argument in the SDK get function. e.g. "vcn_id"
    :param states: List of lifecycle states to watch for while waiting after create_fn is called.
                   e.g. [module.params['wait_until'], "FAULTY"]
    :param client: OCI service client instance to call the service periodically to retrieve data.
                   e.g. VirtualNetworkClient()
    :param kwargs_get: Dictionary containing arguments to be used to call the get function which requires multiple arguments.
    :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True}
    (RR�(
R�tfunctiontkwargs_functionRqR�R�RCR�R�t&update_target_resource_id_in_get_paramR�R�R�((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRBs

c	
@s
|r|jjdd
�r|dkrAtd�tjd�n|rltdj|��t||�}	n1tdj|d��t|i|d|6�}	�d
kr�|jjd�p�t�nt	t
j||	d	�fd
�d|jjdt��j
�}n|S(s
    A utility function to  wait for the resource to get into the state as specified in
    the module options.
    :param client: OCI service client instance to call the service periodically to retrieve data.
                   e.g. VirtualNetworkClient
    :param module: Instance of AnsibleModule.
    :param wait_applicable: Specifies if wait for create is applicable for this resource
    :param kwargs_get: Dictionary containing arguments to be used to call the get function which requires multiple arguments.
    :param get_fn: Function in the SDK to get the resource. e.g. virtual_network_client.get_vcn
    :param get_param: Name of the argument in the SDK get function. e.g. "vcn_id"
    :param resource_type: Type of the resource to be created. e.g. "vcn"
    :param states: List of lifecycle states to watch for while waiting after create_fn is called.
                   e.g. [module.params['wait_until'], "FAULTY"]
    :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True}
    R9tcompartmentsNPausing execution for permission on the newly created compartment to be ready.is8Waiting for resource to reach READY state. get_args: {0}s6Waiting for resource with id {0} to reach READY state.tidR<tevaluate_responsec@s|jj�kS(N(RnR(tr(R�(sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt<lambda>wstmax_wait_secondsR:N(R`RaR�RbttimetsleepRcR�tDEFAULT_READY_STATESRRfR<RARn(
R�RqR�R�R�RCR�R�R�tresponse_get((R�sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR�?s0
	c	C@s)y�|jjdd�rdtdj|jj��tj||dd�d|jjdt	��}nItdj|jj��tj||dd�d|jjdt	��}Wnqt
k
r�}tt|��|jd	t|��n9t
k
r!}tt|��|jd	t|��nX|jS(
NR9s>Waiting for work request with id {0} to reach SUCCEEDED state.RKcS@s|jjdkS(NR!(Rntstatus(RL((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRM�sRNR:s=Waiting for work request with id {0} to reach ACCEPTED state.cS@s|jjdkS(NtACCEPTED(RnRS(RL((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRM�sRO(R`RaR�RbRcRnRJRfR<RAR	R%RjR(R�R�Rqt
wait_responseRu((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytwait_on_work_request�s6				c
@stddddddg�}
tdt�}t�||<y?tt||�j�}|rbd|ksw|d|
krUt||�}
|	r�|
jjd	�}t|jd
|�}tt	|||��|d<t
|d<tt||�j�}qUtdj||��t
|d<|rU|j
jd
d�rU�dkrV|j
jd�pPt�nyFtj|||�d�fd�d|j
jdt�dt
�}Wn�tk
r�}|jdt|��nZtk
r }|jdkr�|jd|j�q!td�d|d<|||<|SnXt|�tk	rEt|j�}qRd|d<qUn|||<ntdj||��Wn�tk
r}t|�tjjkr�|jdkr|jdkrtdj||��qn%|jdkr|jd|j�nt�||<nX|S(s/A utility function to delete a resource and wait for the resource to get into the state as specified in the
    module options.
    :param wait_applicable: Specifies if wait for delete is applicable for this resource
    :param resource_type: Type of the resource to be deleted. e.g. "vcn"
    :param client: OCI service client instance to call the service periodically to retrieve data.
                   e.g. VirtualNetworkClient()
    :param get_fn: Function in the SDK to get the resource. e.g. virtual_network_client.get_vcn
    :param kwargs_get: Dictionary of arguments for get function get_fn. e.g. {"vcn_id": module.params["id"]}
    :param delete_fn: Function in the SDK to delete the resource. e.g. virtual_network_client.delete_vcn
    :param kwargs_delete: Dictionary of arguments for delete function delete_fn. e.g. {"vcn_id": module.params["id"]}
    :param module: Instance of AnsibleModule.
    :param states: List of lifecycle states to watch for while waiting after delete_fn is called. If nothing is passed,
                   defaults to ["TERMINATED", "DETACHED", "DELETED"].
    :param process_work_request: Whether a work request is generated on an API call and if it needs to be handled.
    :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True}
    RRRRRRR�Rsopc-work-request-idtwork_request_idtwork_requestsDeleted {0}, {1}R9R<RKc@s|jj�kS(N(RnR(RL(R�(sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyRM�s	RNR:tsucceed_on_not_foundROi�s[API returned Status:404(Not Found) while waiting for resource to get into terminated state.sAResource {0} with {1} already deleted. So returning changed=Falsei�tInvalidParameterN(tsetR=R?RR�RnR�Ratget_work_requestRVR>RbRcR`R�tDEFAULT_TERMINATED_STATESRfR<RAR	RjR%RRSR�R$Rtdnst	DnsClienttcode(R�R�R�R�t	delete_fnt
kwargs_deleteRqR�R�tprocess_work_requestt
states_setR�R�R�twr_idtget_wr_responseRURu((R�sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytdelete_and_wait�sr


		



cC@s�x{|D]s}t||d�}t|d|�}|dk	r||krztd|dt|�dt|��tSqqWtS(sx
    Check if the specified attributes are equal in the specified 'model' and 'module'. This is used to check if an OCI
    Model instance already has the values specified by an Ansible user while invoking an OCI Ansible module and if a
    resource needs to be updated.
    :param current_resource: A resource model instance
    :param module: The AnsibleModule representing the options provided by the user
    :param attributes: A list of attributes that would need to be compared in the model and the module instances.
    :return: True if the values for the list of attributes is the same in the model and module instances
    R3s/are_attrs_equal - current resource's attribute s
 value is s/ and this doesn't match user provided value of N(R�R�RRbR%R?R>(tcurrent_resourceRqt
attributesR�t
curr_valuetuser_provided_value((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytare_attrs_equals

'cC@sa|jj|d�}|dkr]|jj|d�}|dk	r]|jj|d�}q]n|S(sb
    Returns the user provided value for "attribute_name". We consider aliases in the module.
    N(R`RaR�taliases(RqR3Rktoption_alias_for_attribute((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR3scC@s�|jj�}x�|D]�}t||d�}t|d|�}||kr|dk	r�tdj|||��t|||�q�t|||�qqW|S(se
    Update the 'update_model' with user provided values in 'module' for the specified 'attributes' if they are different
    from the values in the 'curr_model'.
    :param curr_model: A resource model instance representing the state of the current resource
    :param update_model: An instance of the update resource model for the current resource's type
    :param module: An AnsibleModule representing the options provided by the user
    :return: An updated 'update_model' instance filled with values that would need to be updated in the current resource
    state to satisfy the user's requested state.
    R3shUser requested {0} for attribute {1}, whereas the current value is {2}. So adding it to the update modelN(R�RR�R�RRbRcR�(t
curr_modeltupdate_modelRqRiR�tcurr_value_for_attrRk((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytupdate_model_with_user_optionsCs

cC@sktdtdddddddtjj�}|jd	igd
6ddgd
6dgd6dt�|j�S(Ntmax_attempts_checktmax_attemptsi
t$retry_max_wait_between_calls_secondsitretry_base_sleep_time_secondsitbackoff_typetservice_error_retry_configi�t
QuotaExceededt
LimitExceededi�tConflicti�tservice_error_retry_on_any_5xx(R
R>Rftretryt+BACKOFF_FULL_JITTER_EQUAL_ON_THROTTLE_VALUEtadd_service_error_checktget_retry_strategy(tretry_strategy_builder((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt_get_retry_strategycs	

cK@sjd|krt�|d<ny||�SWn9tk
re}dt|�kr_|d=||�S�nXdS(Ntretry_strategysunexpected keyword argument(R�RR%(tfnR�tte((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR�vs
cC@s�d}x�|jj�D]�}t||�}t|t�r^x�|D]}|t|�}qAWqt|t�r�x`|j�D]6\}}|tt|�td�t|��}qzWq|tt||��}qW|S(s�
    Compute a hash of all the fields in the object
    :param obj: Object whose hash needs to be computed
    :return: a hash value for the object
    it:(R�RR�RR6thashR=R�(tobjtsumtfieldtfield_valueR�RR((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytgeneric_hash�s
1cC@s |dkrtS|j|jkS(N(R�R?t__dict__(R�tother((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt
generic_eq�scC@sDi|jd6td6td6}d|j}t||f|�}|S(s�Make a class hash-able by generating a subclass with a __hash__ method that returns the sum of all fields within
    the parent classt__init__t__hash__t__eq__tGeneratedSub(R�R�R�t__name__R$(tparent_classtdict_of_method_in_subclasst
subclass_nametgenerated_sub_class((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytgenerate_subclass�s


cC@st|�}|�S(N(R�(t
class_typethashed_class((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytcreate_hashed_instance�scC@sD|dkrdSg}x'|D]}|jt|||��qW|S(N(R�R�tget_hashed_object(R�tobject_with_valuestattributes_class_typethashed_class_instancestobject_with_value((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_hashed_object_list�s
c
C@s�|dkrdSt|�}|�}|rMtt|j�t|�@�}n	|j}xh|D]`}t||�}|r�x2|D]'}	t||	�rt|	|�}qqWn|j||�q]W|S(s/
    Convert any class instance into hashable so that the
    instances are eligible for various comparison
    operation available under set() object.
    :param class_type: Any class type whose instances needs to be hashable
    :param object_with_value: Instance of the class type with values which
     would be set in the resulting isinstance
    :param attributes_class_type: A list of class types of attributes, if attribute is a custom class instance
    :param supported_attributes: A list of attributes which should be considered while populating the instance
     with the values in the object. This helps in avoiding new attributes of the class_type which are still not
     supported by the current implementation.
    :return: A hashable instance with same state of the provided object_with_value
    N(	R�R�R6R[R�R�RR�R�(
R�R�R�tsupported_attributestHashedClassthashed_class_instancetclass_attributest	attributetattribute_valuetattribute_class_type((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR��s"		

cC@szt}t|t||��}|dkr=|j||�n9|j|�}|rf|j||�n|j||�|S(s4
    Checks the difference and updates an attribute which is represented by a class
    instance. Not aplicable if the attribute type is a primitive value.
    For example, if a class name is A with an attribute x, then if A.x = X(), then only
    this method works.
    :param update_class_details The instance which should be updated if there is change in
     attribute value
    :param existing_instance The instance  whose attribute value is compared with input
     attribute value
    :param attr_name Name of the attribute whose value should be compared
    :param attr_class Class type of the attribute
    :param input_attr_value The value of input attribute which should replaced the current
     value in case of mismatch
    :return: A boolean value indicating whether attribute value has been replaced
    N(R?R�R�R�R�R�(tupdate_class_detailstexisting_instanceR�t
attr_classtinput_attr_valueR�texisting_attr_value((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt!update_class_type_attr_difference�scK@sad}yt||�}|j}Wn8tk
r\}|jdkr]|jd|j�q]nX|S(s�
    Returns the requested resource if it exists based on the input arguments.
    :param target_fn The function which should be used to find the requested resource
    :param module Instance of AnsibleModule attribute value
    :param kwargs A map of arguments consisting of values based on which requested resource should be searched
    :return: Instance of requested resource
    i�RON(R�R�RnRRSRjR�(R�RqR�RR�Ru((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_existing_resources
c
C@s�t|�}t|t�}g}|r�t|j|jd�dt�j�}xm|D]S}|d|d<y|t||�7}WqUt	k
r�}	|	j
dkr�q�qUXqUWnt||�}t|�}td�|D�d�S(NR3tcompartment_id_in_subtreeRJR�i�cs@s%|]}|ddkr|VqdS(Rt	ATTACHINGRN(R�R((t.0tvolume_attachment((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pys	<genexpr>Fs(
RzR�R
Rtlist_compartmentsRaR>RnR�RRStnextR�(
Rqtlookup_attached_instancetlist_attachments_fntlist_attachments_argsRgRwtvolume_attachmentstcompartmentsRIRu((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_attached_instance_infos,
c@s�fd�}|S(Nc@s&tjjdd�r"�||�SdS(NtOCI_ANSIBLE_EXPERIMENTAL(RdReRaR�(targsR�(R�(sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytwrapperOs
((R�R�((R�sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt
check_modeNscC@s:|r$t||||�\}}ng}t}||fS(N(tget_component_list_differenceR>(tinput_component_listtexisting_componentstpurge_componentstdelete_componentsR�((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt*check_and_return_component_list_differenceWscC@s�|rd|dkrdtfSt|�jt|��}|rWtt|�|�tfSdtfSn|dkrz|tfS|r�t|�jt|��}|r�|tfSnt|�jt|��}|r�t|�|tfSdtfS(N(R�R?R[tintersectionR6R>tsymmetric_differencet
difference(R�R�R�R�tcomponent_differencestcomponents_differences((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR�gs(



cC@s/tt|�d��}|j|�WdQXdS(Ntwb(topenRtwrite(R�tcontentt	dest_file((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt
write_to_file�scK@s�ddd��Y}y\t||�}|dk	rax-|D]"}|j|kr8|d|�Sq8Wn|dd�SWn&tk
r�}|jd|j�nXdS(sn
    Returns a resource filtered by identifer from a list of resources. This method should be
    used as an alternative of 'get resource' method when 'get resource' is nor provided by
    resource api. This method returns a wrapper of response object but that should not be
    used as an input to 'wait_until' utility as this is only a partial wrapper of response object.
    :param module The AnsibleModule representing the options provided by the user
    :param list_resource_fn The function which lists all the resources
    :param target_resource_id The identifier of the resource which should be filtered from the list
    :param kwargs A map of arguments consisting of values based on which requested resource should be searched
    :return: A custom wrapper which partially wraps a response object where the data field contains the target
     resource, if found.
    tResponseWrappercB@seZd�ZRS(cS@s
||_dS(N(Rn(tselfRn((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR��s(R�t
__module__R�(((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyR��sRnRON((R�R�RJRRjR�(Rqtlist_resource_fnttarget_resource_idR�R�t	resourcesR�Ru((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pytget_target_resource_from_list�s
(ht
__future__RR�tlogging.configRdR�RtoperatorRROtyamlRft
oci.constantsRtoci.exceptionsRRRRRR	toci.identity.identity_clientR
toci.object_storage.modelsRRt	oci.retryR
toci.utilRRR>tHAS_OCI_PY_SDKtImportErrorR?tansible.module_utils._textRtansible.module_utils.sixRRkRARRQR]RERJR�RzR�RiRlR�R�R�RbR�R�R�R�R�R�R�R�R�R�R�R
RRRRRR&R-R.R�RR>R7RDRERBR�RVRgRlRRrR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sI/usr/lib/python2.7/site-packages/ansible/module_utils/oracle/oci_utils.pyt<module>s�.


		.
y	&					$			=	
	"	
		Y					K					�	@	.0,8	/f			 						)	#		0	
	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]