def attach(cls, ip, vm, background=False, force=False):
        """ Attach """
        vm_ = Iaas.info(vm)
        ip_ = cls.info(ip)
        if not cls._check_and_detach(ip_, vm_):
            return

        # then we should attach the ip to the vm
        attach = Iface._attach(ip_['iface_id'], vm_['id'])
        if not background:
            cls.display_progress(attach)

        return attach
def attach ( cls , ip , vm , background = False , force = False ) : vm_ = Iaas . info ( vm ) ip_ = cls . info ( ip ) if not cls . _check_and_detach ( ip_ , vm_ ) : return attach = Iface . _attach ( ip_ [ 'iface_id' ] , vm_ [ 'id' ] ) if not background : cls . display_progress ( attach ) return attach
Attach