src/lsi/utils/hosts.py
def from_dict(cls, entry_dict):
        """Deserialize a HostEntry from a dictionary.

        This is more or less the same as calling
        HostEntry(**entry_dict), but is clearer if something is
        missing.

        :param entry_dict: A dictionary in the format outputted by to_dict().
        :type entry_dict: ``dict``

        :return: A HostEntry object.
        :rtype: ``cls``
        """
        return cls(
            name=entry_dict["name"],
            instance_type=entry_dict["instance_type"],
            hostname=entry_dict["hostname"],
            private_ip=entry_dict["private_ip"],
            public_ip=entry_dict["public_ip"],
            stack_name=entry_dict["stack_name"],
            stack_id=entry_dict["stack_id"],
            logical_id=entry_dict["logical_id"],
            security_groups=entry_dict["security_groups"],
            tags=entry_dict["tags"],
            ami_id=entry_dict["ami_id"],
            launch_time=entry_dict["launch_time"],
            instance_id=entry_dict["instance_id"]
        )
def from_dict(cls, entry_dict):
        return cls(
            name=entry_dict["name"],
            instance_type=entry_dict["instance_type"],
            hostname=entry_dict["hostname"],
            private_ip=entry_dict["private_ip"],
            public_ip=entry_dict["public_ip"],
            stack_name=entry_dict["stack_name"],
            stack_id=entry_dict["stack_id"],
            logical_id=entry_dict["logical_id"],
            security_groups=entry_dict["security_groups"],
            tags=entry_dict["tags"],
            ami_id=entry_dict["ami_id"],
            launch_time=entry_dict["launch_time"],
            instance_id=entry_dict["instance_id"]
        )
def from_dict ( cls , entry_dict ) : return cls ( name = entry_dict [ "name" ] , instance_type = entry_dict [ "instance_type" ] , hostname = entry_dict [ "hostname" ] , private_ip = entry_dict [ "private_ip" ] , public_ip = entry_dict [ "public_ip" ] , stack_name = entry_dict [ "stack_name" ] , stack_id = entry_dict [ "stack_id" ] , logical_id = entry_dict [ "logical_id" ] , security_groups = entry_dict [ "security_groups" ] , tags = entry_dict [ "tags" ] , ami_id = entry_dict [ "ami_id" ] , launch_time = entry_dict [ "launch_time" ] , instance_id = entry_dict [ "instance_id" ] )
Deserialize a HostEntry from a dictionary.

        This is more or less the same as calling
        HostEntry(**entry_dict), but is clearer if something is
        missing.

        :param entry_dict: A dictionary in the format outputted by to_dict().
        :type entry_dict: ``dict``

        :return: A HostEntry object.
        :rtype: ``cls``
Deserialize a HostEntry from a dictionary .