Пример #1
0
def setMemory(uuid, memory, cache_only=None):
    if cache_only:
        return (0, "no-ops for caching", {})
    try:
        support.setMemory(uuid, memory)
    except errors.VirtualizationException, ve:
        return (1, str(ve), {})
Пример #2
0
def setMemory(uuid, memory, cache_only=None):
    if cache_only:
        return (0, "no-ops for caching", {})
    try:
        support.setMemory(uuid, memory)
    except errors.VirtualizationException, ve:
        return (1, str(ve), {})
Пример #3
0
def setMemory(uuid, memory, cache_only=None):
    if cache_only:
        return (0, "no-ops for caching", {})
    try:
        support.setMemory(uuid, memory)
    except errors.VirtualizationException:
        ve = sys.exc_info()[1]
        return (1, str(ve), {})
    return (0, "Memory set to %s on %s." % (str(memory), str(uuid)), {})
Пример #4
0
def setMemory(uuid, memory, cache_only=None):
    if cache_only:
        return (0, "no-ops for caching", {})
    try:
        support.setMemory(uuid, memory)
    except errors.VirtualizationException:
        ve = sys.exc_info()[1]
        return (1, str(ve), {})
    return (0, "Memory set to %s on %s." % (str(memory), str(uuid)), {})