Hi Hans,

> As I previously proposed (and even provided patch for) to change the SG FSM
> state to "non stable" would solve the problem in a more elegant and "standard"
> way. Why can't we just do that instead?
This is not related to this problem. This will not solve problem of assigning 
more than one csi in one ccb.

> And what about the use case, a fact is that no documentation states that only 
> a
> single CSI per CCB can be used. What are the complications of supporting
> multiple CSIs per CCB?

CSI is addition should be event based that means we can only allow CSI one at a 
time. 
This is because Specs is not describing how to give csi when any csi is added 
to existing si.
So, once we add one csi and it get fully assigned, then we should allow another 
csi to get added.
Adding more than one csi will lead to get assigned once csi first one. It will 
miss to assign another csi
as there is no trigger to assign that csis. The code need to be added to store 
one csi while one csi is being added.
The existing code doesn't support adding two csi in parallel and the event to 
trigger assigning another
csi when one csi is assigned is not there in the code.

I am not finding any application use case to support multiple csi in one go.

Thanks
-Nagu
> -----Original Message-----
> From: Hans Feldt [mailto:hans.fe...@ericsson.com]
> Sent: 09 January 2014 17:35
> To: Nagendra Kumar; hans.nordeb...@ericsson.com; Praveen Malviya
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [PATCH 1 of 1] amf: Donot allow more than 1 csi addition in 
> single
> ccb [#681]
> 
> Hi,
> 
> As I previously proposed (and even provided patch for) to change the SG FSM
> state to "non stable" would solve the problem in a more elegant and "standard"
> way. Why can't we just do that instead?
> 
> And what about the use case, a fact is that no documentation states that only 
> a
> single CSI per CCB can be used. What are the complications of supporting
> multiple CSIs per CCB?
> 
> Thanks,
> Hans
> 
> 
> On 12/19/2013 04:45 PM, nagendr...@oracle.com wrote:
> >   osaf/libs/common/immsv/include/immutil.h |   1 +
> >   osaf/services/saf/amf/amfd/csi.cc        |  12 +++++++++++-
> >   osaf/tools/safimm/src/immutil.c          |  15 +++++++++++++++
> >   3 files changed, 27 insertions(+), 1 deletions(-)
> >
> >
> > diff --git a/osaf/libs/common/immsv/include/immutil.h
> > b/osaf/libs/common/immsv/include/immutil.h
> > --- a/osaf/libs/common/immsv/include/immutil.h
> > +++ b/osaf/libs/common/immsv/include/immutil.h
> > @@ -172,6 +172,7 @@ CcbUtilOperationData_t *ccbutil_getNextC
> >    * @return CcbUtilOperationData_t*
> >    */
> >   CcbUtilOperationData_t *ccbutil_getCcbOpDataByDN(SaImmOiCcbIdT id,
> > const SaNameT *dn);
> > +CcbUtilOperationData_t
> *ccbutil_getCcbOpDataByClassName(SaImmOiCcbIdT
> > +ccbId, CcbUtilOperationData_t *opData);
> >
> >   /*@}*/
> >   /**
> > diff --git a/osaf/services/saf/amf/amfd/csi.cc
> > b/osaf/services/saf/amf/amfd/csi.cc
> > --- a/osaf/services/saf/amf/amfd/csi.cc
> > +++ b/osaf/services/saf/amf/amfd/csi.cc
> > @@ -424,7 +424,17 @@ static SaAisErrorT csi_ccb_completed_cre
> >
> >     avsv_sanamet_init(&opdata->objectName, &si_name, "safSi");
> >     avd_si = avd_si_get(&si_name);
> > -
> > +   /* Donot allow two csi in single ccb if si is already assigned. */
> > +   if ((opdata != NULL) && (avd_si != NULL)) {
> > +           if ((ccbutil_getCcbOpDataByClassName(opdata->ccbId, opdata)
> != NULL) &&
> > +                           (NULL != avd_si->list_of_sisu)) {
> > +                   report_ccb_validation_error(opdata, "'%s' More than
> one csi in CCB for assigned si,"
> > +                                   " not allowed", opdata-
> >objectName.value);
> > +                   rc = SA_AIS_ERR_BAD_OPERATION;
> > +                   LOG_WA("More than one csi in CCB for assigned si");
> > +                   goto done;
> > +           }
> > +   }
> >     if (NULL != avd_si) {
> >             /* Check whether si has been assigned to any SU. */
> >             if (NULL != avd_si->list_of_sisu) { diff --git
> > a/osaf/tools/safimm/src/immutil.c b/osaf/tools/safimm/src/immutil.c
> > --- a/osaf/tools/safimm/src/immutil.c
> > +++ b/osaf/tools/safimm/src/immutil.c
> > @@ -222,6 +222,21 @@ CcbUtilOperationData_t *ccbutil_getCcbOp
> >           return opData;
> >   }
> >
> > +CcbUtilOperationData_t
> *ccbutil_getCcbOpDataByClassName(SaImmOiCcbIdT
> > +ccbId, CcbUtilOperationData_t *opData) {
> > +        CcbUtilOperationData_t *opData_p =
> > +ccbutil_getNextCcbOp(ccbId, NULL);
> > +
> > +        while (opData_p != NULL) {
> > +           if ((strcmp(opData->param.create.className, opData_p-
> >param.create.className) == 0) &&
> > +                           (opData_p != opData)) /* Should return
> another object with the same name. */
> > +                   break;
> > +
> > +           opData_p = ccbutil_getNextCcbOp(ccbId, opData_p);
> > +   }
> > +
> > +        return opData_p;
> > +}
> > +
> >   /* ----------------------------------------------------------------------
> >    * General IMM help utilities;
> >    */
> >
> >

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to