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    
dmapi / usr / lib / python2.7 / dist-packages / dmapi / db / sqlalchemy / models.pyc
Size: Mime:
ó
Ëú^c@sLdZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZddlmZdd	lmZmZmZmZmZdd
lmZejZeƒZd„Zdejej fd
„ƒYZ!dee!ej"fd„ƒYZ#dee!ej"fd„ƒYZ$dee!ej"fd„ƒYZ%dee!ej"fd„ƒYZ&dee!ej"fd„ƒYZ'dee!ej"fd„ƒYZ(dee!ej"fd„ƒYZ)dee!ej"fd„ƒYZ*dee!ej"fd„ƒYZ+d ee!ej"fd!„ƒYZ,d"S(#s"
SQLAlchemy models for nova data.
iÿÿÿÿ(tcfg(tmodels(t	timeutils(tColumntIndextIntegert
BigIntegertEnumtStringtschematUnicode(t
MEDIUMTEXT(tdeclarative_base(torm(t
ForeignKeytDateTimetBooleantTexttFloat(ttypescCstƒjtƒdƒS(Ntmysql(Rtwith_variantR(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyt
MediumTextst	DmapiBasecBseZdZd„ZRS(cCs2tjƒ}|j|dtƒ}|j|ƒ|S(s\Implement a safe copy.copy().

        SQLAlchemy-mapped objects travel with an object
        called an InstanceState, which is pegged to that object
        specifically and tracks everything about that object.  It's
        critical within all attribute operations, including gets
        and deferred loading.   This object definitely cannot be
        shared among two instances, and must be handled.

        The copy routine here makes use of session.merge() which
        already essentially implements a "copy" style of operation,
        which produces a new instance with a new InstanceState and copies
        all the data along mapped attributes without using any SQL.

        The mode we are using here has the caveat that the given object
        must be "clean", e.g. that it has no database-loaded state
        that has been updated and not flushed.   This is a good thing,
        as creating a copy of an object including non-flushed, pending
        database state is probably not a good idea; neither represents
        what the actual row looks like, and only one should be flushed.

        tload(R
tSessiontmergetFalsetexpunge(tselftsessiontcopy((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyt__copy__ s
N(t__name__t
__module__tNonetmetadataR (((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyRstInstancecBs
eZdZdZedddeƒeddƒedddƒedd	ƒed
ddƒed
ddƒedddƒeddddƒeddddƒedddƒedddƒejdddƒfZgZ	e
ededeƒZe
d„ƒZe
d„ƒZe
edƒƒZe
edƒƒZe
edƒƒZe
edƒƒZe
edƒƒZe
edƒƒZe
eƒZe
edƒƒZe
eƒƒZe
eƒZe
edƒƒZe
edƒƒZe
eƒZe
eƒZe
eƒZ e
eƒZ!e
ed ƒƒZ"e
edƒƒZ#e
edƒƒZ$e
eƒZ%e
eƒƒZ&e
edƒƒZ'e
e(ƒZ)e
e(ƒZ*e
edƒƒZ+e
edƒƒZ,e
edƒƒZ-e
eƒƒZ.e
e/ƒZ0e
e1d!d"ƒƒZ2e
edƒƒZ3e
edƒƒZ4e
edƒƒZ5e
ed ƒd#e6ƒZ7e
edƒƒZ8e
edƒƒZ9e
edƒƒZ:e
edƒƒZ;e
e<j=ƒƒZ>e
e<j=ƒƒZ?e
e/ƒƒZ@e
eƒZAe
e/ƒd$e6ƒZBe
e/ƒd$e6ƒZCe
edƒƒZDe
ed$d%ƒZERS(&sRepresents a guest VM.t	instancestuuidtuniquetinstances_project_id_idxt
project_idt instances_project_id_deleted_idxtdeletedtinstances_reservation_id_idxtreservation_idt'instances_terminated_at_launched_at_idxt
terminated_attlaunched_attinstances_uuid_deleted_idxt#instances_task_state_updated_at_idxt
task_statet
updated_attinstances_host_node_deleted_idxthosttnodet"instances_host_deleted_cleaned_idxtcleanedt instances_deleted_created_at_idxt
created_att#instances_updated_at_project_id_idxtnametuniq_instances0uuidtprimary_keyt
autoincrementcCs¬ytj|j}Wn‘tk
r§i}xIttj|ƒjƒD]/}|j}|dkrdqCn||||<qCWytj|}Wq¨t	k
r£|j
}q¨XnX|S(NR>(tCONFtinstance_name_templatetidt	TypeErrortiterR
t
object_mappertcolumnsR>tKeyErrorR'(Rt	base_nametinfotcolumntkey((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR>[s
	
cCsdgS(NR>((R((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyt_extra_keysqsiÿi$townertadmintnullabletdefaulti(FR!R"t__doc__t
__tablename__RtTrueR	tUniqueConstraintt__table_args__tinjected_filesRRRDtpropertyR>RNRtuser_idR*t	image_reft	kernel_idt
ramdisk_idthostnametlaunch_indextkey_nameRtkey_datatpower_statetvm_stateR4t	memory_mbtvcpustroot_gbtephemeral_gbtephemeral_key_uuidR7R8tinstance_type_idt	user_dataR.RR1R0tavailability_zonetdisplay_nametdisplay_descriptiontlaunched_onRtlockedRt	locked_bytos_typetarchitecturetvm_modeRR'troot_device_nametdefault_ephemeral_devicetdefault_swap_devicetconfig_driveRt	IPAddresstaccess_ip_v4taccess_ip_v6tauto_disk_configtprogresstshutdown_terminatetdisable_terminatet	cell_nameR:(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR%=s’							tServicecBsOeZdZdZejdddddƒejdddddƒed	d
deƒfZe	e
deƒZe	ed
ƒdeƒZ
e	edƒƒZe	edƒƒZe	edƒƒZe	e
deddƒZe	edeƒZe	edƒƒZe	edeƒZe	edeƒZe	e
ddƒZejddddddeƒZRS(s'Represents a running service on a host.tservicesR7ttopicR,R>t uniq_services0host0topic0deletedtbinaryt!uniq_services0host0binary0deletedtservices_uuid_idxR'R(R@i$RQiÿRRiR%tbackreftprimaryjoinsZand_(Service.host == Instance.host,Service.binary == "nova-compute",Instance.deleted == 0)tforeign_keys(R!R"RSRTR	RVRRURWRRRDRR'R7R„R‚Rtreport_countRtdisabledtdisabled_reasonRtlast_seen_uptforced_downtversionR
trelationshiptinstance(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR€Ýs.tComputeNodecBs<eZdZdZedddeƒejddddd	ƒfZe	e
d
eƒZe	e
deƒZe	e
dƒdeƒZe	e
d
ƒdeƒZe	e
deƒZe	e
deƒZe	e
deƒZe	e
deƒZe	e
deƒZe	e
deƒZe	eƒdeƒZe	e
deƒZe	e
dƒƒZe	e
ƒZe	e
ƒZe	e
ƒZe	e
ƒZe	eƒdeƒZe	e
ƒZ e	e!j"ƒƒZ#e	e$ƒZ%e	e$ƒZ&e	e$ƒZ'e	e$ƒZ(e	e$ddƒZ)e	e$ƒZ*e	e+deƒZ,e	e+deƒZ-e	e+deƒZ.e	e
deddƒZ/RS(s/Represents a running compute service on a host.t
compute_nodestcompute_nodes_uuid_idxR'R(R7thypervisor_hostnameR,R>t3uniq_compute_nodes0host0hypervisor_hostname0deletedR@RQiÿi$RRs{}i(0R!R"RSRTRRUR	RVRWRRRDt
service_idRR7R'RReRdtlocal_gbt
vcpus_usedtmemory_mb_usedt
local_gb_usedRthypervisor_typethypervisor_versionR•tfree_ram_mbtfree_disk_gbtcurrent_workloadtrunning_vmstcpu_infotdisk_available_leastRRxthost_ipRtsupported_instancestmetricst	pci_statstextra_resourceststatst
numa_topologyRtram_allocation_ratiotcpu_allocation_ratiotdisk_allocation_ratiotmapped(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR’þsHtInstanceMetadatacBs˜eZdZdZeddƒfZeedeƒZ	ee
dƒƒZee
dƒƒZee
dƒe
dƒƒZejedd	d
eddƒZRS(
sCRepresents a user-provided metadata key/value pair for an instance.tinstance_metadatat#instance_metadata_instance_uuid_idxt
instance_uuidR@iÿi$sinstances.uuidR‡R$R‰RˆsSand_(InstanceMetadata.instance_uuid == Instance.uuid,InstanceMetadata.deleted == 0)(R!R"RSRTRRWRRRURDRRMtvalueRR²R
RR%R‘(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR¯IstInstanceSystemMetadatacBsžeZdZdZeddƒfZeedeƒZ	ee
dƒdeƒZee
dƒƒZ
ee
dƒedƒdeƒZejedd	d
eƒZRS(sBRepresents a system-owned metadata key/value pair for an instance.tinstance_system_metadataR²R@iÿRQi$sinstances.uuidR‡tsystem_metadataR‰(R!R"RSRTRRWRRRURDRRRMR³RR²R
RR%R‘(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR´[s	tInstanceInfoCachec	Bs­eZdZdZejdddƒfZeede	de	ƒZ
eeƒƒZee
dƒedƒd	eƒZejed
ejddeƒd
edeejkƒZRS(s8Represents a cache of information about an instance
    tinstance_info_cachesR²R>t'uniq_instance_info_caches0instance_uuidR@RAi$sinstances.uuidRQR‡t
info_cachetuselistR‰Rˆ(R!R"RSRTR	RVRWRRRURDRtnetwork_infoRRRR²R
RR%R‡R'R‘(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR·ms	t SecurityGroupInstanceAssociationcBsheZdZeddƒfZeededeƒZ	eee
dƒƒZeedƒe
dƒƒZ
RS(t#security_group_instance_associationt5security_group_instance_association_instance_uuid_idxR²R@RQssecurity_groups.idi$sinstances.uuid(R!R"RTRRWRRRURRDRtsecurity_group_idRR²(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyR½‚st
SecurityGroupc
Bs³eZdZdZejdddddƒfZeede	ƒZ
eedƒƒZeedƒƒZ
eedƒƒZeedƒƒZejedd	d
ddd
ddƒZRS(sRepresents a security group.tsecurity_groupsR*R>R,t,uniq_security_groups0project_id0name0deletedR@iÿt	secondaryR¾Rˆs•and_(SecurityGroup.id == SecurityGroupInstanceAssociation.security_group_id,SecurityGroupInstanceAssociation.deleted == 0,SecurityGroup.deleted == 0)t
secondaryjoins[and_(SecurityGroupInstanceAssociation.instance_uuid == Instance.uuid,Instance.deleted == 0)R‡(R!R"RSRTR	RVRWRRRURDRR>tdescriptionRZR*R
RR%R&(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyRÁstSecurityGroupIngressRulecBsÎeZdZdZdZeedeƒZeee	dƒƒZ
ejdddde
dd	ƒZ
eed
ƒƒZeeƒZeeƒZeejƒƒZeee	dƒƒZejddeddƒZRS(
s&Represents a rule in a security group.tsecurity_group_rulesR@ssecurity_groups.idRÁR‡trulesR‰Rˆshand_(SecurityGroupIngressRule.parent_group_id == SecurityGroup.id,SecurityGroupIngressRule.deleted == 0)iÿsaand_(SecurityGroupIngressRule.group_id == SecurityGroup.id,SecurityGroupIngressRule.deleted == 0)((R!R"RSRTRWRRRURDRtparent_group_idR
Rtparent_groupRtprotocolt	from_porttto_portRtCIDRtcidrtgroup_idt
grantee_group(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyRǬs 	tSecurityGroupIngressDefaultRulecBsheZdZdZeededeƒZee	dƒƒZ
eeƒZeeƒZee
jƒƒZRS(tsecurity_group_default_rulesR@RQi((R!R"RTRWRRRURRDRRÌRÍRÎRRÏRÐ(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyRÓÈsN(-RStoslo_configRtoslo_db.sqlalchemyRt
oslo_utilsRt
sqlalchemyRRRRRRR	R
tsqlalchemy.dialects.mysqlRtsqlalchemy.ext.declarativeRR
RRRRRtdmapi.db.sqlalchemyRRBtBASERtTimestampMixint	ModelBaseRtSoftDeleteMixinR%R€R’R¯R´R·R½RÁRÇRÓ(((s>/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/models.pyt<module>s0:(				  !K