/usr/lib/python2.6/site-packages/novaclient
NameSizeModeActions
openstack/-0755rm
tests/-0755rm
v1_1/-0755rm
v2/-0755rm
api_versions.py135520644editdlrm
api_versions.pyc137060644editdlrm
auth_plugin.py49460644editdlrm
auth_plugin.pyc57840644editdlrm
base.py108690644editdlrm
base.pyc99830644editdlrm
client.py315860644editdlrm
client.pyc259010644editdlrm
crypto.py12930644editdlrm
crypto.pyc11230644editdlrm
exceptions.py72270644editdlrm
exceptions.pyc118160644editdlrm
extension.py14710644editdlrm
extension.pyc15690644editdlrm
i18n.py11440644editdlrm
i18n.pyc5610644editdlrm
service_catalog.py35210644editdlrm
service_catalog.pyc26970644editdlrm
shell.py360070644editdlrm
shell.pyc259140644editdlrm
utils.py122050644editdlrm
utils.pyc125050644editdlrm
__init__.py8390644editdlrm
__init__.pyc4670644editdlrm
Edit: /usr/lib/python2.6/site-packages/novaclient/api_versions.pyc (13706B)
Ñò =vVc@stddkZddkZddkZddkZddkZddklZddkZddklZddk l Z l Z ddk l Z ddklZeieƒZeipeieiƒƒnhdd6ZhZe d ƒZd efd „ƒYZd efd „ƒYZd„Zd„Zd„Zd„Zd„Zd„Z d„Z!dd„Z#dd„Z$dS(iÿÿÿÿN(tstrutils(t exceptions(t_t_LW(tcliutils(tutilst2s1.1s.'%(other)s' should be an instance of '%(cls)s't APIVersioncBs†eZdZdd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „ZRS(s¬This class represents an API Version with convenience methods for manipulation and comparison of version numbers that we need to do to implement microversions. cCs¼d|_d|_|dj o™tid|ƒ}|o]t|idƒƒ|_|idƒdjotdƒ|_q´t|idƒƒ|_q¸tdƒ|}t i |ƒ‚ndS( sCreate an API version object.is!^([1-9]\d*)\.([1-9]\d*|0|latest)$iitlatesttinfswInvalid format of client version '%s'. Expected format 'X.Y', where X is a major part and Y is a minor part of version.N( t ver_majort ver_minortNonetretmatchtinttgrouptfloatRRtUnsupportedVersion(tselft version_strRtmsg((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__init__/s    cCs-|iƒo d|iSd|i|ifS(s'Debug/Logging representation of object.sLatest API Version Major: %ss API Version Major: %s, Minor: %s(t is_latestR R (R((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__str__Es  cCs$|iƒodSd|iƒSdS(Nss(tis_nullt get_string(R((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__repr__Ls cCs|idjo |idjS(Ni(R R (R((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyRRscCs|itdƒjS(NR (R R(R((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyRUscCsWt|tƒp%tth|d6|id6ƒ‚n|i|if|i|ifjS(Ntothertcls(t isinstanceRt TypeErrort_type_error_msgt __class__R R (RR((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__lt__Xs cCsWt|tƒp%tth|d6|id6ƒ‚n|i|if|i|ifjS(NRR(RRRR R!R R (RR((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__eq__`s cCsWt|tƒp%tth|d6|id6ƒ‚n|i|if|i|ifjS(NRR(RRRR R!R R (RR((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__gt__hs cCs||jp ||jS(N((RR((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__le__pscCs|i|ƒ S(N(R#(RR((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__ne__sscCs||jp ||jS(N((RR((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt__ge__vscCs|iƒottdƒƒ‚n|iƒo|iƒotS|iƒo ||jS|iƒo ||jS||jo|jSSdS(säReturns whether the version object represents a version greater than or equal to the minimum version and less than or equal to the maximum version. :param min_version: Minimum acceptable version. :param max_version: Maximum acceptable version. :returns: boolean If min_version is null then there is no minimum limit. If max_version is null then there is no maximum limit. If self is null then raise ValueError s*Null APIVersion doesn't support 'matches'.N(Rt ValueErrorRtTrue(Rt min_versiont max_version((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pytmatchesys     cCsV|iƒottdƒƒ‚n |iƒod|idfSd|i|ifS(sƒConverts object to string representation which if used to create an APIVersion object results in the same version. s.Null APIVersion cannot be converted to string.s%s.%sR(RR(RRR R (R((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR’s   N(t__name__t __module__t__doc__R RRRRRR"R#R$R%R&R'R,R(((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR)s            tVersionedMethodcBs#eZd„Zd„Zd„ZRS(cCs(||_||_||_||_dS(sVersioning information for a single method :param name: Name of the method :param start_version: Minimum acceptable version :param end_version: Maximum acceptable_version :param func: Method to call Minimum and maximums are inclusive N(tnamet start_versiont end_versiontfunc(RR1R2R3R4((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR s   cCsd|i|i|ifS(Ns#Version Method %s: min: %s, max: %s(R1R2R3(R((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR¯scCs d|iS(Ns(R1(R((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR³s(R-R.RRR(((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyR0žs  cCsstidƒ}titiitƒgƒ}g}|D].\}}}|i|ƒo||dq8q8~}|S(Nsv[0-9]*$i( R tcompiletpkgutilt iter_modulestostpathtdirnamet__file__tsearch(tmatchert submodulest_[1]tloaderR1tispkgtavailable_versions((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pytget_available_major_versions·s (cCs°tƒ}|iƒ o•t|iƒ|jot|ƒdjo,tdƒh|iƒd6|dd6}n.tdƒh|iƒd6di|ƒd6}ti |ƒ‚ndS( sÆChecks major part of ``APIVersion`` obj is supported. :raises novaclient.exceptions.UnsupportedVersion: if major part is not supported isFInvalid client version '%(version)s'. Major part should be '%(major)s'tversionitmajorsLInvalid client version '%(version)s'. Major part must be one of: '%(major)s's, N( RCRtstrR tlenRRtjoinRR(t api_versionRBR((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pytcheck_major_versionÂs     cCsˆt|ƒ}|tjo7titdƒh|d6t|d6ƒt|}nti|ƒod|}nt|ƒ}t|ƒ|S(s!Returns checked APIVersion objects`Version %(deprecated_version)s is deprecated, using alternative version %(alternative)s instead.tdeprecated_versiont alternatives%s.0( RFtDEPRECATED_VERSIONStLOGtwarningRRt is_int_likeRRJ(tversion_stringRI((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pytget_api_versionØs      cCsX|iiƒ}t|dƒ p |i otƒtƒfSt|iƒt|iƒfS(NRD(tversionst get_currentthasattrRDRR*(tclientRD((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt_get_server_version_rangeêscCs=t|ƒ\}}|iƒ o•|tdƒjo‚|iƒo&|iƒotitdƒƒ‚n|i||ƒp7titdƒh|iƒd6|iƒd6ƒ‚n|S|tdƒjoQ|tdƒjp|iƒo|iƒo tdƒStitdƒƒ‚n|iƒo|iƒo tdƒSt i |joWtitdƒht i iƒd 6t i iƒd 6|iƒd 6|iƒd 6ƒ‚n•t i |joWtitd ƒht i iƒd 6t i iƒd 6|iƒd 6|iƒd 6ƒ‚n.t i |jot i S|t i jo|SdS(süChecks ``requested_version`` and returns the most recent version supported by both the API and the client. :param client: client object :param requested_version: requested version represented by APIVersion obj :returns: APIVersion s2.0s$Server doesn't support microversionssbThe specified version isn't supported by server. The valid version range is '%(min)s' to '%(max)s'tmintmaxs2.1s:The server isn't backward compatible with Nova V2 REST APIsªServer version is too old. The client valid version range is '%(client_min)s' to '%(client_max)s'. The server valid version range is '%(server_min)s' to '%(server_max)s'.t client_mint client_maxt server_mint server_maxsªServer version is too new. The client valid version range is '%(client_min)s' to '%(client_max)s'. The server valid version range is '%(server_min)s' to '%(server_max)s'.N( RWRRRRRRR,Rt novaclienttAPI_MIN_VERSIONtAPI_MAX_VERSION(RVtrequested_versiontserver_start_versiontserver_end_version((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pytdiscover_versionósX             cCs6|iƒ o$|idjo|iƒ|d[s(RpRIRtVersionNotFoundForAPIMethodRRYR4(tobjtargstkwargstmethodstmethod(R1(sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyt substitutionSs t arguments( R)t versionedRtget_function_nameR0Rkt functoolstwrapsRUR{Rtadd_arg(R4RjRztcli_argst cli_kwargs(R3R2(R1sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pytdecorLs      (RR (R2R3Rƒ((R2R3sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyREs  (%R~tloggingR8R6R t oslo_utilsRR^Rtnovaclient.i18nRRtnovaclient.openstack.commonRRt getLoggerR-RNthandlerst addHandlert StreamHandlerRMRgR tobjectRR0RCRJRRRWRdRfRkR RpR(((sB/tmp/pip-build-cD3xZi/python-novaclient/novaclient/api_versions.pyts6         u   >