From: Michael Chase-S. <mc...@us...> - 2011-04-29 21:40:55
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv7235 Modified Files: ChangeLog Makefile.am NEWS configure.ac control.c interopServerProvider.c sfcb.cfg.pre.in Added Files: 20_indication.mof.pre.in Removed Files: 20_indication.mof Log Message: 3190623 Set *IsSettable properties to false for IndicationService Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.654 retrieving revision 1.655 diff -u -d -r1.654 -r1.655 --- ChangeLog 28 Apr 2011 21:48:28 -0000 1.654 +++ ChangeLog 29 Apr 2011 21:40:50 -0000 1.655 @@ -1,3 +1,9 @@ +2011-04-29 Michael Chase-Salerno <br...@li...> + + * 20_indication.mof.pre.in, Makefile.am, configure.ac + control.c, interopServerProvider.c, sfcb.cfg.pre.in: + [ 3190623 ] Set *IsSettable propperties to false for IndicationService + 2011-04-28 Chris Buccella <buc...@li...> * cimcClientSfcbLocal.c: --- NEW FILE: 20_indication.mof.pre.in --- // // instance of CIM_RegisteredProfile // for Indications Profile // class SFCB_IndicationServiceCapabilities : CIM_IndicationServiceCapabilities { }; instance of SFCB_IndicationServiceCapabilities { InstanceID = "CIM:SFCB_ISC"; FilterCreationEnabledIsSettable = FALSE; DeliveryRetryAttemptsIsSettable = SETTABLE; DeliveryRetryIntervalIsSettable = SETTABLE; SubscriptionRemovalActionIsSettable = SETTABLE; SubscriptionRemovalTimeIntervalIsSettable = SETTABLE; MaxListenerDestinations = 100; MaxActiveSubscriptions = 100; SubscriptionsPersisted = TRUE; }; instance of SFCB_RegisteredProfile { InstanceID = "CIM:SFCB_IP"; RegisteredOrganization = 2; RegisteredName = "Indications"; RegisteredVersion = "1.1.0"; AdvertiseTypes = 3; }; class SFCB_ElementCapabilities : CIM_ElementCapabilities { }; --- 20_indication.mof DELETED --- Index: interopServerProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopServerProvider.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- interopServerProvider.c 14 May 2010 20:20:34 -0000 1.31 +++ interopServerProvider.c 29 Apr 2011 21:40:50 -0000 1.32 @@ -718,6 +718,29 @@ if(!CMClassPathIsA(_broker, cop, "cim_indicationservice", NULL)) return rc; + + // Get the settable props + int settable=0; + CMPIObjectPath *iscop = CMNewObjectPath(_broker, "root/interop", "SFCB_IndicationServiceCapabilities",NULL); + CMPIEnumeration *iscenm = _broker->bft->enumerateInstances(_broker, ctx, iscop, NULL, NULL); + CMPIData iscinst = CMGetNext(iscenm, NULL); + CMPIData iscprop = CMGetProperty(iscinst.value.inst, "DeliveryRetryAttemptsIsSettable", NULL); + if (!iscprop.value.boolean) settable++; + iscprop = CMGetProperty(iscinst.value.inst, "DeliveryRetryIntervalIsSettable", NULL); + if (!iscprop.value.boolean) settable++; + iscprop = CMGetProperty(iscinst.value.inst, "SubscriptionRemovalActionIsSettable", NULL); + if (!iscprop.value.boolean) settable++; + iscprop = CMGetProperty(iscinst.value.inst, "SubscriptionRemovalTimeIntervalIsSettable", NULL); + if (!iscprop.value.boolean) settable++; + + if (iscop) CMRelease(iscop); + if (iscenm) CMRelease(iscenm); + + // If any of the settable props were false, no MI of indication service allowed + // We're assuming that this is the only reason for doing an MI + if (settable > 0) return rc; + + // Ok, all is well to continue with the operation... ctxLocal = native_clone_CMPIContext(ctx); val.string = sfcb_native_new_CMPIString("$DefaultProvider$", NULL,0); ctxLocal->ft->addEntry(ctxLocal, "rerouteToProvider", &val, CMPI_string); @@ -753,23 +776,44 @@ CMPIInstance * ci = NULL; CMPIContext * ctxLocal; CMPIBoolean filterCreation=1; - CMPIUint16 retryAttempts=3; /* retry indications 3 times */ - CMPIUint32 retryInterval=20;/* at a 20 second interval */ - CMPIUint16 subRemoval=2; /* 2 == "Remove" */ - CMPIUint32 subRemovalInterval=2592000; /* 30 days */ + CMPIUint16 retryAttempts,subRemoval; + CMPIUint32 tmp,retryInterval,subRemovalInterval; + + // Get the retry parameters from the config file + getControlUNum("DeliveryRetryInterval", &retryInterval); + getControlUNum("DeliveryRetryAttempts", &tmp); + if (tmp > UINT16_MAX) { + // Exceeded max range, set to default + mlogf(M_ERROR, M_SHOW, "--- Value for DeliveryRetryAttempts exceeds range, using default.\n"); + retryAttempts=3; + } else { + retryAttempts=(CMPIUint16) tmp; + } + getControlUNum("SubscriptionRemovalTimeInterval", &subRemovalInterval); + getControlUNum("SubscriptionRemovalAction", &tmp); + if (tmp > UINT16_MAX) { + // Exceeded max range, set to default + mlogf(M_ERROR, M_SHOW, "--- Value for SubscriptionRemovalAction exceeds range, using default.\n"); + subRemoval=2; + } else { + subRemoval= (CMPIUint16) tmp; + } ctxLocal = native_clone_CMPIContext(ctx); val.string = sfcb_native_new_CMPIString("$DefaultProvider$", NULL,0); ctxLocal->ft->addEntry(ctxLocal, "rerouteToProvider", &val, CMPI_string); op=CMNewObjectPath(_broker,"root/interop","CIM_IndicationService",&st); - ci=CMNewInstance(_broker,op,&st); CMAddKey(op,"CreationClassName","CIM_IndicationService",CMPI_chars); CMAddKey(op,"SystemCreationClassName","CIM_ComputerSystem",CMPI_chars); str[0]=str[511]=0; gethostname(str,511); CMAddKey(op,"SystemName",str,CMPI_chars); CMAddKey(op,"Name",getSfcbUuid(),CMPI_chars); + // Delete the instance so we can replace with proper values + CBDeleteInstance(_broker,ctxLocal,op); + ci = CMNewInstance(_broker, op, &st); + CMSetProperty(ci,"CreationClassName","CIM_IndicationService",CMPI_chars); CMSetProperty(ci,"SystemCreationClassName","CIM_ComputerSystem",CMPI_chars); CMSetProperty(ci,"SystemName",str,CMPI_chars); Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- configure.ac 1 Apr 2011 01:57:59 -0000 1.116 +++ configure.ac 29 Apr 2011 21:40:50 -0000 1.117 @@ -109,6 +109,10 @@ [AC_HELP_STRING([--enable-tests(=TESTS)], [Enable listed tests. If none are listed, all are enabled.])]) +AC_ARG_ENABLE(settableretry, + [AC_HELP_STRING([--enable-settableretry], + [Allow reliable indication params to be settable.])]) + AC_ARG_ENABLE(uds, [AC_HELP_STRING([--enable-uds], [Enable UDS authentication.])]) @@ -182,6 +186,7 @@ # Check and configure requested tests. if test "$enable_tests" == "yes"; then + enable_settableretry="yes" if test "$enable_local_connect_only" == "yes"; then enable_tests="localtests,gcov" else @@ -300,6 +305,10 @@ AC_DEFINE(HAVE_UDS,,[UDS authentication enabled]) fi +if test "$enable_settableretry" == "yes"; then + AC_DEFINE(SETTABLERETRY,,[Settable indication parameters enabled]) +fi + if test "$enable_qualifierrep" == "yes"; then LOAD_QUALIFIER_PROVIDER= @@ -486,6 +495,7 @@ fi AM_CONDITIONAL(INDICATIONS,[test "$enable_indications" == "yes"]) +AM_CONDITIONAL(SETTABLERETRY,[test "$enable_settableretry" == "yes"]) AM_CONDITIONAL(JDBC,[test "$enable_jdbc" == "yes"]) AM_CONDITIONAL(SSL,[test "$enable_ssl" == "yes"]) AM_CONDITIONAL(SLP,[test "$enable_slp" == "yes"]) @@ -499,7 +509,7 @@ AM_CONDITIONAL(LOCAL_CONNECT_ONLY,[test "$enable_local_connect_only" == "yes"]) AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh - sfcbuuid.sh sfcb.cfg.pre getSchema.sh.pre + sfcbuuid.sh sfcb.cfg.pre getSchema.sh.pre 20_indication.mof.pre sfcb.init-redhat sfcb.init-suse sfcb.init-none default.reg man/genSslCert.1.pre man/sfcbmof.1.pre man/sfcbunstage.1.pre man/sfcbuuid.1.pre man/getSchema.1.pre @@ -524,6 +534,7 @@ echo -e "uds"\\t\\t\\t\\t"${enable_uds:-no}" echo -e "tests"\\t\\t\\t\\t"${enable_tests:-no}" echo -e "debug"\\t\\t\\t\\t"${enable_debug:-no}" +echo -e "Settable retry parameters"\\t"${enable_settableretry:-no}" echo ================================================================= echo echo "sfcb configuration complete. you may now run 'make'" Index: sfcb.cfg.pre.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.cfg.pre.in,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- sfcb.cfg.pre.in 10 Nov 2010 20:30:32 -0000 1.24 +++ sfcb.cfg.pre.in 29 Apr 2011 21:40:50 -0000 1.25 @@ -236,3 +236,25 @@ ## Can be overriden by setting environment variable SFCB_TRACE_LEVEL. ## Default is 0. If trace mask is set (by any method) the default is 1. #traceLevel: 0 + +##----------------------------Reliable Indications ---------------------------- +## Interval between indication retry attempts +## Default is 20 seconds +#DeliveryRetryInterval: 20 + +## Number of retry attempts before giving up +## Default is 3 attempts (not including initial attempt) +## A value of 0 disables reliable indications +#DeliveryRetryAttempts: 3 + +## The length of time an destination can fail before the subscription +## removal action below is taken +## Default is 2592000 seconds (30 days) +#SubscriptionRemovalTimeInterval: 2592000 + +## The action taken when the time interval expires +## Default is 2, remove the subscription +## Other values: 3, disable the subscription +## 4, ignore (do nothing) +#SubscriptionRemovalAction: 2 + Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.581 retrieving revision 1.582 diff -u -d -r1.581 -r1.582 --- NEWS 28 Apr 2011 21:48:28 -0000 1.581 +++ NEWS 29 Apr 2011 21:40:50 -0000 1.582 @@ -1,6 +1,9 @@ Changes in 1.3.12 ================= +New features: +- 3190623 Set *IsSettable properties to false for IndicationService + Bugs fixed: - 3261868 Enum CQL filter on NULL cause incorrect rsp Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- control.c 10 Nov 2010 20:30:32 -0000 1.34 +++ control.c 29 Apr 2011 21:40:50 -0000 1.35 @@ -57,6 +57,9 @@ char * configfile = NULL; +// Control initial values +// { property, type, value} +// Type: 0=string, 1=num, 2=bool, 3=unstripped string Control init[] = { {"httpPort", 1, "5988"}, {"enableHttp", 2, "true"}, @@ -119,6 +122,11 @@ {"httpMaxContentLength", 1, "100000000"}, {"validateMethodParamTypes", 2, "false"}, {"maxMsgLen", 1, "10000000"}, + {"DeliveryRetryInterval",1,"20"}, + {"DeliveryRetryAttempts",1,"3"}, + {"SubscriptionRemovalTimeInterval",1,"2592000"}, + {"SubscriptionRemovalAction",1,"2"}, + }; void sunsetControl() Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- Makefile.am 20 Aug 2010 20:00:17 -0000 1.109 +++ Makefile.am 29 Apr 2011 21:40:50 -0000 1.110 @@ -505,6 +505,15 @@ sed -e s?$$\{prefix\}?$(prefix)?g \ -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ +if SETTABLERETRY +20_indication.mof: 20_indication.mof.pre + sed -e s?SETTABLE?TRUE?g $< > $@ +else +20_indication.mof: 20_indication.mof.pre + sed -e s?SETTABLE?FALSE?g $< > $@ +endif + + sfcb: sfcb.$(INIT_STYLE) sed -e s?$$\{prefix\}?$(prefix)?g \ -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ |