Exemplo n.º 1
0
def buildings_building_id_robots_post(buildingId) -> str:
    try:
        building = Building.get(buildingId)
    except Exception as e:
        print(e)
        return 'Building with id %s does not exist.' % (buildingId)
    newID = str(uuid.uuid4())
    newObj = Robot(id=newID, buildingId=buildingId)
    newObj.save()
    return newObj.attribute_values
Exemplo n.º 2
0
def buildings_building_id_robots_post(buildingId):
    """ method to post robot under a  building """
    try:
        building = Building.get(buildingId)
    except Exception:
        return 'Building with id %s does not exist.' % (buildingId)
    newid = str(uuid.uuid4())
    newobj = Robot(id=newid, buildingId=buildingId)
    newobj.save()
    return newobj.attribute_values
def buildings_building_id_robots_post(buildingId):
    """ method to post robot under a  building """
    try:
        building = Building.get(buildingId)
    except Exception:
        return 'Building with id %s does not exist.' % (buildingId)
    newid = str(uuid.uuid4())
    newobj = Robot(id=newid, buildingId=buildingId)
    newobj.save()
    return newobj.attribute_values
Exemplo n.º 4
0
def buildings_building_id_robots_post(buildingId) -> str:
    try:
        building = Building.get(buildingId)
    except Exception as e:
        print(e)
        return 'Building with id %s does not exist.' % (buildingId)
    newID = str(uuid.uuid4())
    newObj = Robot(id=newID, buildingId=buildingId)
    newObj.save()
    return newObj.attribute_values