Did I find the right examples for you? yes no

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

src/t/u/tuskar-HEAD/tuskar/db/sqlalchemy/api.py   tuskar(Download)
                        old_c = flavor.capacities[i]
                        if old_c.name == new_c.name:
                            new_capacity = models.Capacity(name=new_c.name,
                                                           value=new_c.value,
                                                           unit=new_c.unit)
 
                for c in new_rack.capacities:
                    capacity = models.Capacity(name=c.name, value=c.value,
                            unit=c.unit)
                    session.add(capacity)
            if new_rack.capacities:
                for c in new_rack.capacities:
                    capacity = models.Capacity(name=c.name, value=c.value,
                            unit=c.unit)
                    session.add(capacity)
            session.add(flavor)
            for c in new_flavor.capacities:
                capacity = models.Capacity(name=c.name,
                                           value=c.value,
                                           unit=c.unit)