How to use the cloudbridge.cloud.interfaces.resources.LabeledCloudResource function in cloudbridge

To help you get started, we’ve selected a few cloudbridge examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CloudVE / cloudbridge / cloudbridge / cloud / interfaces / resources.py View on Github external
"""
        pass

    @abstractproperty
    def extra_data(self):
        """
        A dictionary of extra data about this instance. May contain
        nested dictionaries, but all key value pairs are strings or integers.

        :rtype: ``dict``
        :return: Extra attributes for this VM type.
        """
        pass


class VMFirewall(LabeledCloudResource):
    """
    Represents a firewall resource applied to virtual machines.

    This is in contrast to a firewall for a network, for example.
    """

    __metaclass__ = ABCMeta

    @LabeledCloudResource.label.setter
    @abstractmethod
    def label(self, value):
        """
        Set the resource label.
        """
        pass
github CloudVE / cloudbridge / cloudbridge / cloud / interfaces / resources.py View on Github external
    @LabeledCloudResource.label.setter
    @abstractmethod
    def label(self, value):
        """
        Set the snapshot label.
        """
        pass
github CloudVE / cloudbridge / cloudbridge / cloud / interfaces / resources.py View on Github external
:cvar AVAILABLE: Volume is available and can be attached to an instance.
    :cvar IN_USE: Volume is attached and in-use.
    :cvar DELETED: Volume has been deleted. No further operations possible.
    :cvar ERROR: Volume is in an error state. No further operations possible.

    """
    UNKNOWN = "unknown"
    CREATING = "creating"
    CONFIGURING = "configuring"
    AVAILABLE = "available"
    IN_USE = "in-use"
    DELETED = "deleted"
    ERROR = "error"


class Volume(ObjectLifeCycleMixin, LabeledCloudResource):
    """
    Represents a block storage device (aka volume).
    """

    __metaclass__ = ABCMeta

    @LabeledCloudResource.label.setter
    @abstractmethod
    def label(self, value):
        """
        Set the volume label.
        """
        pass

    @abstractproperty
    def description(self):
github CloudVE / cloudbridge / cloudbridge / cloud / interfaces / resources.py View on Github external
:cvar UNKNOWN: Snapshot state unknown.
    :cvar PENDING: Snapshot is pending.
    :cvar CONFIGURING: Snapshot is being configured in some way.
    :cvar AVAILABLE: Snapshot has been completed and is ready for use.
    :cvar ERROR: Snapshot is in an error state. No further operations possible.

    """
    UNKNOWN = "unknown"
    PENDING = "pending"
    CONFIGURING = "configuring"
    AVAILABLE = "available"
    ERROR = "error"


class Snapshot(ObjectLifeCycleMixin, LabeledCloudResource):
    """
    Represents a snapshot of a block storage device.
    """

    __metaclass__ = ABCMeta

    @LabeledCloudResource.label.setter
    @abstractmethod
    def label(self, value):
        """
        Set the snapshot label.
        """
        pass

    @abstractproperty
    def description(self):
github CloudVE / cloudbridge / cloudbridge / cloud / interfaces / resources.py View on Github external
    @LabeledCloudResource.label.setter
    @abstractmethod
    def label(self, value):
        """
        Set the resource label.

        :type value: ``str``
        :param value: The value to set the label to.
        """
        pass
github CloudVE / cloudbridge / cloudbridge / cloud / interfaces / resources.py View on Github external
Standard states for a network.

    :cvar UNKNOWN: Network state unknown.
    :cvar PENDING: Network is being created.
    :cvar AVAILABLE: Network is available.
    :cvar DOWN: Network is not operational.
    :cvar ERROR: Network is in error state.
    """
    UNKNOWN = "unknown"
    PENDING = "pending"
    AVAILABLE = "available"
    DOWN = "down"
    ERROR = "error"


class Network(ObjectLifeCycleMixin, LabeledCloudResource):
    """
    Represents a software-defined network, like the Virtual Private Cloud.
    """
    __metaclass__ = ABCMeta

    @LabeledCloudResource.label.setter
    @abstractmethod
    def label(self, value):
        """
        Set the resource label.

        :type value: ``str``
        :param value: The value to set the label to.
        """
        pass
github CloudVE / cloudbridge / cloudbridge / cloud / interfaces / resources.py View on Github external
:param is_root: Determines which device will serve as the root device.
                        If more than one device is defined as root, an
                        ``InvalidConfigurationException`` will be thrown.

        :type  size: ``int``
        :param size: The size of the volume to create. An implementation may
                     ignore this parameter for certain sources like 'Volume'.

        :type  delete_on_terminate: ``bool``
        :param delete_on_terminate: Determines whether to delete or keep the
                                    volume on instance termination.
        """
        pass


class MachineImage(ObjectLifeCycleMixin, LabeledCloudResource):

    __metaclass__ = ABCMeta

    @abstractproperty
    def description(self):
        """
        Get the image description.

        :rtype: ``str``
        :return: Description for this image as returned by the cloud
                 middleware.
        """
        pass

    @abstractproperty
    def min_disk(self):