Esempio n. 1
0
def resetJournal(domain_uuid):
    # To get the VM Journal object from the dictionary
    #    :param domain: QEMU domain UUID
    dict = cache.get_cache_region()
    jo = None
    if type(dict.get(domain_uuid)) is NoValue:
        jo = Journal.factory(domain_uuid)
        dict.set(domain_uuid, jo)
    else:
        jo = dict.get(domain_uuid)

    jo.resetState()
Esempio n. 2
0
    def _getJournalObject(self, domain_uuid):
        """Function: To get the dictionary

        :param domain: QEMU domain
        :return: the journal object referred by domain_uuid
        """

        dict = cache.get_cache_region()
        if type(dict.get(domain_uuid)) is NoValue:
            jo = Journal.factory(domain_uuid)
            dict.set(domain_uuid, jo)
            return jo
        else:
            return dict.get(domain_uuid)
Esempio n. 3
0
    def getVmFsm(self, domain_uuid):
        """Function: To get the VM Finite State Machine from
        the dictionary

        :param domain: QEMU domain
        :return: FSM object
        """
        dict = cache.get_cache_region()

        if type(dict.get(domain_uuid)) is NoValue:
            jo = Journal.factory(domain_uuid)
            dict.set(domain_uuid, jo)
            return jo
        else:
            return dict.get(domain_uuid)