def __init__(self, manager, id, name, ip, created, state=VmState.UNKNOWN, metadata=None, tags=None,
                 flavor=None, image=None, timed_shutdown_at=None):

        """ Init for VM.

        :arg AbstractIaasDriver manager: class implementing Vm actions.
        :arg string id: Vm uniq id.
        :arg string name: Vm name/preset_name ??.
        :arg list ip: Vm ip list.
        :arg datetime/int created: Timestamp when Vm was created
        :arg VmState state: Vm state.
        :arg dict metadata: Vm metadata.
        :arg list tags: Vm tags.
        :arg string flavor: Vm flavor name.
        :arg string image: Vm image name.
        :arg int timed_shutdown_at: Timestamp when VM will be terminated.
        """

        self.manager = manager
        self.id = id
        self.name = name
        self.ip = ip
        self.state = state
        self.metadata = metadata
        self.tags = tags
        self.flavor = flavor
        self.image = image
        self.timed_shutdown_at = timed_shutdown_at
        if isinstance(created, datetime.datetime):
            self.created = created
        elif isinstance(created, (int, float)):
            self.created = datetime.datetime.fromtimestamp(created)
        else:
            # actually it's not so crucial to fail
            self.created = time.time()
def __init__ ( self , manager , id , name , ip , created , state = VmState . UNKNOWN , metadata = None , tags = None , flavor = None , image = None , timed_shutdown_at = None ) : self . manager = manager self . id = id self . name = name self . ip = ip self . state = state self . metadata = metadata self . tags = tags self . flavor = flavor self . image = image self . timed_shutdown_at = timed_shutdown_at if isinstance ( created , datetime . datetime ) : self . created = created elif isinstance ( created , ( int , float ) ) : self . created = datetime . datetime . fromtimestamp ( created ) else : self . created = time . time ( )
Init for VM.

        :arg AbstractIaasDriver manager: class implementing Vm actions.
        :arg string id: Vm uniq id.
        :arg string name: Vm name/preset_name ??.
        :arg list ip: Vm ip list.
        :arg datetime/int created: Timestamp when Vm was created
        :arg VmState state: Vm state.
        :arg dict metadata: Vm metadata.
        :arg list tags: Vm tags.
        :arg string flavor: Vm flavor name.
        :arg string image: Vm image name.
        :arg int timed_shutdown_at: Timestamp when VM will be terminated.