Ejemplo n.º 1
0
 def attach_router(self, router_id):
     router_binding_obj = binding.QosPolicyRouterGatewayIPBinding(
         self.obj_context, policy_id=self.id, router_id=router_id)
     try:
         router_binding_obj.create()
     except db_exc.DBReferenceError as e:
         raise qos_exc.RouterQosBindingError(policy_id=self.id,
                                             router_id=router_id,
                                             db_error=e)
Ejemplo n.º 2
0
    def _attach_qos_policy(self, qos_policy_id):
        qos_binding.QosPolicyRouterGatewayIPBinding.delete_objects(
            self.obj_context, router_id=self.id)
        if qos_policy_id:
            qos_binding.QosPolicyRouterGatewayIPBinding(
                self.obj_context, policy_id=qos_policy_id,
                router_id=self.id).create()

        self.qos_policy_id = qos_policy_id
        self.obj_reset_changes(['qos_policy_id'])
Ejemplo n.º 3
0
 def attach_router(self, router_id):
     LOG.info('%s(): caller(): %s', log_utils.get_fname(1),
              log_utils.get_fname(2))
     router_binding_obj = binding.QosPolicyRouterGatewayIPBinding(
         self.obj_context, policy_id=self.id, router_id=router_id)
     try:
         router_binding_obj.create()
     except db_exc.DBReferenceError as e:
         raise qos_exc.RouterQosBindingError(policy_id=self.id,
                                             router_id=router_id,
                                             db_error=e)