Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
·EYc@s§ddlZddlZddlZddlZddljZdejfd„ƒYZde	fd„ƒYZ
d„Zde	fd„ƒYZd	e	fd
„ƒYZ
dS(iÿÿÿÿNtSchemaBasedModelcBs/eZdZd„Zejjjd„ƒZRS(sPGlance specific subclass of the warlock Model.

    This implementation alters the function of the patch property
    to take into account the schema's core properties. With this version
    undefined properties which are core will generated 'replace'
    operations rather than 'add' since this is what the Glance API
    expects.
    cCsŽ|jdƒsg}n'idd6|jdƒd6dd6g}tj||ƒjƒ}tj|ƒ}|sytj|ƒStj||ƒSdS(Nttagss/tagstpathtvaluetreplacetop(tgett	jsonpatcht
make_patcht	to_stringtjsontloadstdumps(tselftnewtoriginalt
tags_patchtpatch_stringtpatch((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyt_make_custom_patch!s	


cCs°tj|jdƒ}t|ƒ}|jrŒx^tj|jdƒD]C\}}||krB||krB|jdtƒrBd||<qBqBWnd|d<d|d<|j
||ƒS(s1Return a jsonpatch object representing the delta.t__original__t
propertiestis_baseRN(tcopytdeepcopyt__dict__tdicttschematsixt	iteritemsRtTruetNoneR(R
RRtnametprop((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyR0s	#

(t__name__t
__module__t__doc__RtwarlocktModelRtgetter(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyRs	tSchemaPropertycBseZd„ZRS(cKs4||_|jdƒ|_|jdtƒ|_dS(NtdescriptionR(R RR)RR(R
R tkwargs((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyt__init__As	(R"R#R+(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyR(@scCs=g}x0|jƒD]"\}}|jt||ƒqW|S(shParse the properties dictionary of a schema document.

    :returns: list of SchemaProperty objects
    (titemstappendR((tschema_propertiesRR R!((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyttranslate_schema_propertiesGstSchemacBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs3||_|d|_|d}t|ƒ|_dS(NR R(t_raw_schemaR R/R(R
t
raw_schematraw_properties((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyR+Ss	

cCs|j|tƒS(s,Check if a property with a given name is known to the schema.

        Determines if it is either a base property or a custom one
        registered in schema-image.json file

        :param property_name: name of the property
        :returns: True if the property is known, False otherwise
        (t_check_propertyR(R
t
property_name((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pytis_core_propertyYs	cCs|j|tƒS(s·Checks if a property with a given name is a base property.

        :param property_name: name of the property
        :returns: True if the property is base, False otherwise
        (R4tFalse(R
R5((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pytis_base_propertydscCs4x-|jD]"}||jkr
|jp+|Sq
WtS(N(RR RR7(R
R5tallow_non_baseR!((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyR4lscCstj|jƒS(N(RRR1(R
((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pytrawrs(R"R#R+R6R8R4R:(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyR0Rs
				t
ControllercBseZd„Zd„ZRS(cCs
||_dS(N(thttp_client(R
R<((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyR+wscCs,d|}|jj|ƒ\}}t|ƒS(Ns/v2/schemas/%s(R<RR0(R
tschema_nameturit_R2((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyRzs
(R"R#R+R(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyR;vs	(RR
RRt
warlock.modeltmodelR%R&RtobjectR(R/R0R;(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/glanceclient/v2/schemas.pyt<module>s)	$