Ack,
Mathi.

On Mon, Jul 3, 2017 at 10:06 PM, Alex Jones <[email protected]> wrote:

> This ticket will allow creation of an EE dynamically when the parent is an
> EE.
> Currently this is not allowed by PLM.
> ---
>  src/plm/config/plmsv_classes.xml |  4 ++--
>  src/plm/plmd/plms_imm.c          | 15 +++++++++++++++
>  2 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/src/plm/config/plmsv_classes.xml b/src/plm/config/plmsv_
> classes.xml
> index 7f1b3f6..44dbce8 100644
> --- a/src/plm/config/plmsv_classes.xml
> +++ b/src/plm/config/plmsv_classes.xml
> @@ -27,7 +27,7 @@
>                         <flag>SA_INITIALIZED</flag>
>                 </rdn>
>                 <attr>
> -                       <name>safEE</name>
> +                       <name>saPlmEE</name>
>                         <type>SA_NAME_T</type>
>                         <category>SA_CONFIG</category>
>                         <flag>SA_INITIALIZED</flag>
> @@ -50,7 +50,7 @@
>                         <flag>SA_INITIALIZED</flag>
>                 </rdn>
>                 <attr>
> -                       <name>safEE</name>
> +                       <name>saPlmEE</name>
>                         <type>SA_NAME_T</type>
>                         <category>SA_CONFIG</category>
>                         <flag>SA_INITIALIZED</flag>
> diff --git a/src/plm/plmd/plms_imm.c b/src/plm/plmd/plms_imm.c
> index 264c8c3..ef61b57 100644
> --- a/src/plm/plmd/plms_imm.c
> +++ b/src/plm/plmd/plms_imm.c
> @@ -878,6 +878,8 @@ static SaAisErrorT 
> plms_imm_ccb_obj_create_cbk(SaImmOiHandleT
> imm_oi_hdl,
>                                 if ((strncmp((char *)parent_name->value,
>                                              "safDomain", 9) != 0) &&
>                                     (strncmp((char *)parent_name->value,
> +                                            "safEE", sizeof("safEE") - 1)
> != 0) &&
> +                                   (strncmp((char *)parent_name->value,
>                                              "safHE", 5) != 0)) {
>                                         TRACE_LEAVE2(
>                                             "Invalid DN, object cannot be
> created");
> @@ -902,6 +904,19 @@ static SaAisErrorT 
> plms_imm_ccb_obj_create_cbk(SaImmOiHandleT
> imm_oi_hdl,
>                                         return SA_AIS_ERR_BAD_OPERATION;
>                                 }
>                         }
> +               } else if (!strncmp(attr[j]->attrName, "plmVm",
> sizeof("plmVm") - 1)) {
> +                       /* RDN attribute, store the name and value */
> +                       obj_rdn = *(SaStringT *)*((attr[j])->attrValues);
> +                       TRACE_2("Object RDN: %s", obj_rdn);
> +                       if (!parent_name || (parent_name->length !=
> +                            sizeof("safApp=safPlmService") - 1) ||
> +                           (strncmp((char *)parent_name->value,
> +                                    "safApp=safPlmService",
> +                                    parent_name->length) != 0)) {
> +                               TRACE_LEAVE2(
> +                                   "Invalid DN, object cannot be
> created");
> +                               return SA_AIS_ERR_BAD_OPERATION;
> +                       }
>                 }
>         }
>         if ((ccb_util_ccb_data = ccbutil_getCcbData(ccb_id)) == NULL) {
> --
> 2.7.5
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to