File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/libcloud/common/__pycache__/dimensiondata.cpython-310.pyc
Back
o ;j� � @ s� d Z ddlmZ ddlmZ ddlmZmZmZ ddl m Z ddlmZm Z mZ ddlmZ ddlmZmZ d Zed Zed Zed Zed Zed Zed ZdZi ddddd��ddddd��ddddd��ddddd��dd d!dd��d"d#d$dd��d%d&d'dd��d(d)d*dd��d+dd,d-d��d.dd/d-d��d0dd1d-d��d2d d3d-d��d4d#d5d-d��d6d&d7d-d��d8d)d9d-d��d:dd;d<d��d=dd>d<d��dd?d<d�d d@d<d�d#dAd<d�ddBdCd�ddDdCd�ddEdCd�d dFdCd�d#dGdCd�d&dHdCd�d)dIdCd�dJ� �ZdZdKefdKefdLeffZdMefdMefdNeffZd�dPdQ�Z dRdS� Z!G dTdU� dU�Z"G dVdW� dWe�Z#G dXdY� dYe �Z$G dZd[� d[e�Z%G d\d]� d]e�Z&G d^d_� d_�Z'G d`da� da�Z(G dbdc� dc�Z)G ddde� de�Z*G dfdg� dg�Z+G dhdi� di�Z,G djdk� dk�Z-G dldm� dm�Z.G dndo� do�Z/G dpdq� dq�Z0G drds� ds�Z1G dtdu� du�Z2G dvdw� dw�Z3G dxdy� dy�Z4G dzd{� d{�Z5G d|d}� d}�Z6G d~d� d�Z7G d�d�� d��Z8G d�d�� d��Z9G d�d�� d��Z:G d�d�� d��Z;G d�d�� d��Z<G d�d�� d��Z=G d�d�� d��Z>G d�d�� d��Z?G d�d�� d��Z@G d�d�� d��ZAG d�d�� d��ZBG d�d�� d��ZCG d�d�� d��ZDG d�d�� d��ZEG d�d�� d��ZFG d�d�� d��ZGG d�d�� d��ZHG d�d�� d��ZIG d�d�� d��ZJG d�d�� d��ZKd�S )�z" Dimension Data Common Components � )�sleep)� b64encode)�b�httplib� basestring)�findtext)�RawResponse�XmlResponse�ConnectionUserAndKey)�Node)� LibcloudError�InvalidCredsErrorz#http://oec.api.opsource.net/schemasz /organizationz/serverz/networkz /directoryz/generalz/backupzurn:didata.com:api:cloud:typeszdd-nazNorth America (NA)zapi-na.dimensiondata.comZ DimensionData)�name�host�vendorzdd-euzEurope (EU)zapi-eu.dimensiondata.comzdd-auzAustralia (AU)zapi-au.dimensiondata.comz dd-au-govzAustralia Canberra ACT (AU)zapi-canberra.dimensiondata.comzdd-afzAfrica (AF)zapi-mea.dimensiondata.comzdd-apzAsia Pacific (AP)zapi-ap.dimensiondata.comzdd-latamzSouth America (LATAM)zapi-latam.dimensiondata.comz dd-canadazCanada (CA)zapi-canada.dimensiondata.comzis-nazusapi.cloud.is.co.zaZInternetSolutionszis-euzeuapi.cloud.is.co.zazis-auzauapi.cloud.is.co.zazis-afzmeaapi.cloud.is.co.zazis-apzapapi.cloud.is.co.zazis-latamzlatamapi.cloud.is.co.zaz is-canadazcanadaapi.cloud.is.co.zazntta-nazcloudapi.nttamerica.comZNTTNorthAmericazntta-euzeucloudapi.nttamerica.comzaucloudapi.nttamerica.comzsacloudapi.nttamerica.comzhkcloudapi.nttamerica.comziaas-api-na.cisco-ccs.comZCiscoziaas-api-eu.cisco-ccs.comziaas-api-au.cisco-ccs.comziaas-api-mea.cisco-ccs.comziaas-api-ap.cisco-ccs.comziaas-api-sa.cisco-ccs.comziaas-api-ca.cisco-ccs.com) zntta-auzntta-afzntta-apzcisco-nazcisco-euzcisco-auzcisco-afzcisco-apzcisco-latamzcisco-canadaZresponseCode�result�messageZresultDetail�idc C s: t | |�r t| |�S t | t�r| S td�t| �j|j���)a� Takes in a DD object or string and prints out it's id This is a helper method, as many of our functions can take either an object or a string, and we need an easy way of converting them :param obj: The object to get the id for :type obj: ``object`` :param func: The function to call, e.g. ex_get_vlan. Note: This function needs to return an object which has ``status`` attribute. :type func: ``function`` :rtype: ``str`` z,Invalid type {} looking for basestring or {})� isinstance�getattrr � TypeError�format�type�__name__)�objZobj_typeZid_value� r �Q/opt/saltstack/salt/lib/python3.10/site-packages/libcloud/common/dimensiondata.py�dd_object_to_id� s ��r c C s t | �S �N)�float)�versionr r r �LooseVersion� s r! c @ s e Zd ZdZdZdS )�NetworkDomainServicePlan� ESSENTIALS�ADVANCEDN)r � __module__�__qualname__r# r$ r r r r r"