Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/t/u/tuskar-0.4.1/tuskar/api/controllers/v1/overcloud.py   tuskar(Download)
        # Package for transfer back to the user
        saved_overcloud =\
            models.Overcloud.from_db_model(result)
 
        return saved_overcloud
        result = pecan.request.dbapi.update_overcloud(db_delta)
 
        updated_overcloud = models.Overcloud.from_db_model(result)
 
        # FIXME(lsmola) This is just POC of updating a stack
        LOG.debug('Retrieving overcloud with ID: %s' % overcloud_id)
        overcloud = pecan.request.dbapi.get_overcloud_by_id(overcloud_id)
        transfer_overcloud = models.Overcloud.from_db_model(overcloud)
        return transfer_overcloud
 
        LOG.debug('Retrieving all overclouds')
        overclouds = pecan.request.dbapi.get_overclouds()
        transfer_overclouds = [models.Overcloud.from_db_model(o)
                               for o in overclouds]
        return transfer_overclouds

src/t/u/tuskar-0.4.1/tuskar/tests/api/controllers/v1/test_models.py   tuskar(Download)
 
        # Test
        api_model = api_models.Overcloud.from_db_model(db_model)
 
        # Verify