def create_vip(self, context, vip):
        LOG.debug("MidonetPluginV2.create_vip called: %(vip)r",
                  {'vip': vip})

        with context.session.begin(subtransactions=True):
            v = super(MidonetPluginV2, self).create_vip(context, vip)
            self.api_cli.create_vip(v)
            v['status'] = constants.ACTIVE
            self.update_status(context, loadbalancer_db.Vip, v['id'],
                               v['status'])

        LOG.debug("MidonetPluginV2.create_vip exiting: id=%r", v['id'])
        return v