def setVDI(self, vdi_id):
        '''
        Set VDI by id.

        Used by modeling.
        '''
        updateToOne(relationship=self.vdi,
                    root=self.device(),
                    type_=CLASS_NAME['VDI'],
                    id_=vdi_id)
    def setLocalCacheSR(self, sr_id):
        '''
        Set local_cache_sr relationship by SR id.

        Used by modeling.
        '''
        updateToOne(relationship=self.local_cache_sr,
                    root=self.device(),
                    type_=CLASS_NAME['SR'],
                    id_=sr_id)
Exemple #3
0
    def setNetwork(self, network_id):
        '''
        Set network by id.

        Used by modeling.
        '''
        updateToOne(relationship=self.network,
                    root=self.device(),
                    type_=CLASS_NAME['Network'],
                    id_=network_id)
    def setSuspendImageSR(self, sr_id):
        '''
        Set suspend_image_sr relationship by SR id.

        Used by modeling.
        '''
        updateToOne(relationship=self.suspend_image_sr,
                    root=self.device(),
                    type_=CLASS_NAME['SR'],
                    id_=sr_id)
    def setCrashDumpSR(self, sr_id):
        '''
        Set crash_dump_sr relationship by SR id.

        Used by modeling.
        '''
        updateToOne(relationship=self.crash_dump_sr,
                    root=self.device(),
                    type_=CLASS_NAME['SR'],
                    id_=sr_id)
    def setMasterFor(self, pool_id):
        '''
        Set master_for relationship by Pool id.

        Used by modeling.
        '''
        updateToOne(relationship=self.master_for,
                    root=self.device(),
                    type_=CLASS_NAME['Pool'],
                    id_=pool_id)
    def setSR(self, sr_id):
        '''
        Set SR by id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.sr,
            root=self.device(),
            type_=CLASS_NAME['SR'],
            id_=sr_id)
Exemple #8
0
    def setMaster(self, host_id):
        '''
        Set master relationship by host id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.master,
            root=self.device(),
            type_=CLASS_NAME['Host'],
            id_=host_id)
    def setLocalCacheSR(self, sr_id):
        '''
        Set local_cache_sr relationship by SR id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.local_cache_sr,
            root=self.device(),
            type_=CLASS_NAME['SR'],
            id_=sr_id)
    def setSuspendImageSR(self, sr_id):
        '''
        Set suspend_image_sr relationship by SR id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.suspend_image_sr,
            root=self.device(),
            type_=CLASS_NAME['SR'],
            id_=sr_id)
    def setHost(self, host_id):
        '''
        Set host by id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.host,
            root=self.device(),
            type_=CLASS_NAME['Host'],
            id_=host_id)
    def setVDI(self, vdi_id):
        '''
        Set VDI by id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.vdi,
            root=self.device(),
            type_=CLASS_NAME['VDI'],
            id_=vdi_id)
    def setNetwork(self, network_id):
        '''
        Set network by id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.network,
            root=self.device(),
            type_=CLASS_NAME['Network'],
            id_=network_id)
    def setVMAppliance(self, vmappliance_id):
        '''
        Set VM appliance by id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.vmappliance,
            root=self.device(),
            type_=CLASS_NAME['VMAppliance'],
            id_=vmappliance_id)
    def setHost(self, host_id):
        '''
        Set host by id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.host,
            root=self.device(),
            type_=CLASS_NAME['Host'],
            id_=host_id)
    def setMaster(self, host_id):
        '''
        Set master relationship by host id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.master,
            root=self.device(),
            type_=CLASS_NAME['Host'],
            id_=host_id)
    def setDefaultSR(self, sr_id):
        '''
        Set default_sr relationship by SR id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.default_sr,
            root=self.device(),
            type_=CLASS_NAME['SR'],
            id_=sr_id)
    def setVMAppliance(self, vmappliance_id):
        '''
        Set VM appliance by id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.vmappliance,
            root=self.device(),
            type_=CLASS_NAME['VMAppliance'],
            id_=vmappliance_id)
    def setCrashDumpSR(self, sr_id):
        '''
        Set crash_dump_sr relationship by SR id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.crash_dump_sr,
            root=self.device(),
            type_=CLASS_NAME['SR'],
            id_=sr_id)
    def setMasterFor(self, pool_id):
        '''
        Set master_for relationship by Pool id.

        Used by modeling.
        '''
        updateToOne(
            relationship=self.master_for,
            root=self.device(),
            type_=CLASS_NAME['Pool'],
            id_=pool_id)