Esempio 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
Esempio 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
Esempio 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