def remove_device_remotely(name, password): ''' Delete given device form target Cozy. ''' (url, path) = local_config.get_config(name) (device_id, device_password) = local_config.get_device_config(name) remote.remove_device(url, device_id, password)
def remove_device_remotely(name): ''' Delete given device form target Cozy. ''' (url, path) = local_config.get_config(name) (device_id, password) = local_config.get_device_config(name) password = getpass.getpass('Type your Cozy password to remove your ' 'device remotely:\n') remote.remove_device(url, device_id, password)
def unregister_device(device): ''' Remove device from local configuration, destroy corresponding database and unregister it from remote Cozy. ''' (url, path) = local_config.get_config(device) (device_id, device_password) = local_config.get_device_config(device) print 'Cozy connection removal for %s.' % device local_config.remove(device) print '- Local configuration removed.' dbutils.remove_db(device) print '- Local files removed.' password = getpass.getpass('Please type the password of your Cozy:\n') remote.remove_device(url, device_id, password) print '- Remote configuration removed.' print 'Removal succeeded, everything clean!' % device