Example #1
0
def delete(serial_number, controller_ip, name):
    res = None
    tag = get_tag_by_name(serial_number, controller_ip, name)
    if tag:
        res = tag_dao.delete_tag(serial_number, controller_ip, name)
    if res:
        print('Deleted a tag with name: ' + name)
        sync = {}
        sync['installation'] = tag['installation']
        sync['method'] = sync_methods.DELETE
        sync['table'] = 'tags'
        sync['data'] = tag
        sync['prev'] = None
        res = syncHandler.insert(sync)
    return res
Example #2
0
def delete(tag_name, controller_ip):
    return tag_dao.delete_tag(tag_name, controller_ip)