(file) Return to InteropProvider.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ControlProviders / InteropProvider

Diff for /pegasus/src/Pegasus/ControlProviders/InteropProvider/InteropProvider.cpp between version 1.66 and 1.66.4.2

version 1.66, 2006/11/17 19:35:14 version 1.66.4.2, 2008/02/22 21:49:57
Line 27 
Line 27 
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 //==============================================================================  //=============================================================================
  
 /////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
 //  Interop Provider - This provider services those classes from the //  Interop Provider - This provider services those classes from the
Line 108 
Line 108 
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::localGetInstance");     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER, "InteropProvider::localGetInstance");
  
     Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,      PEG_TRACE((TRC_CONTROLPROVIDER, Tracer::LEVEL4,
         "%s getInstance. instanceName= %s , PropertyList= %s",         "%s getInstance. instanceName= %s , PropertyList= %s",
         thisProvider,         thisProvider,
         (const char *)instanceName.toString().getCString(),         (const char *)instanceName.toString().getCString(),
         (const char *)propertyListToString(propertyList).getCString());          (const char *)propertyListToString(propertyList).getCString()));
  
     // Test if we're looking for something outside of our namespace. This will     // Test if we're looking for something outside of our namespace. This will
     // happen during associators calls from PG_RegisteredProfile instances     // happen during associators calls from PG_RegisteredProfile instances
Line 184 
Line 184 
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
         "InteropProvider::localEnumerateInstances()");         "InteropProvider::localEnumerateInstances()");
     const CIMName & className = ref.getClassName();     const CIMName & className = ref.getClassName();
     Tracer::trace(TRC_CONTROLPROVIDER, Tracer::LEVEL4,      PEG_TRACE((TRC_CONTROLPROVIDER, Tracer::LEVEL4,
         "%s enumerateInstances. referenc= %s , PropertyList= %s",         "%s enumerateInstances. referenc= %s , PropertyList= %s",
         thisProvider,         thisProvider,
         (const char *)className.getString().getCString(),         (const char *)className.getString().getCString(),
         (const char *)propertyListToString(propertyList).getCString());          (const char *)propertyListToString(propertyList).getCString()));
  
     // Verify that ClassName is correct and get its enum value     // Verify that ClassName is correct and get its enum value
     TARGET_CLASS classEnum  = translateClassInput(className);     TARGET_CLASS classEnum  = translateClassInput(className);
Line 242 
Line 242 
                 ref.getNameSpace());                 ref.getNameSpace());
             break;             break;
         }         }
           case PG_ELEMENTCONFORMSTOPROFILE_RP_RP:
           {
               instances = enumElementConformsToProfileRPRPInstances(
                   context,
                   ref.getNameSpace());
               break;
           }
         case PG_SUBPROFILEREQUIRESPROFILE:         case PG_SUBPROFILEREQUIRESPROFILE:
         {         {
             instances = enumSubProfileRequiresProfileInstances();             instances = enumSubProfileRequiresProfileInstances();
Line 301 
Line 308 
 // role and resultRole parameter of an associators/associatorNames operation. // role and resultRole parameter of an associators/associatorNames operation.
 // //
 bool InteropProvider::validAssocClassForObject( bool InteropProvider::validAssocClassForObject(
     const CIMName & assocClass, const CIMName & originClass,      const OperationContext & context,
       const CIMName & assocClass,
       const CIMObjectPath & objectName,
     const CIMNamespaceName & opNamespace,     const CIMNamespaceName & opNamespace,
     String & originProperty, String & targetProperty)      String & originProperty,
       String & targetProperty)
 { {
     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,     PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
         "InteropProvider::validAssocClassForObject()");         "InteropProvider::validAssocClassForObject()");
     TARGET_CLASS assocClassEnum = translateClassInput(assocClass);     TARGET_CLASS assocClassEnum = translateClassInput(assocClass);
     TARGET_CLASS originClassEnum;     TARGET_CLASS originClassEnum;
       CIMName originClass = objectName.getClassName();
     // If the association class is PG_ElementConformsToProfile, we'll have to     // If the association class is PG_ElementConformsToProfile, we'll have to
     // do some special processing in case the origin instance for the operation     // do some special processing in case the origin instance for the operation
     // is managed by another provider.     // is managed by another provider.
Line 362 
Line 373 
     CIMName expectedTargetRole;     CIMName expectedTargetRole;
     CIMName expectedOriginRole;     CIMName expectedOriginRole;
  
       Array<CIMName> propNames;
       String profileName;
       CIMPropertyList propertyList;
       CIMInstance tmpInstance;
       Uint32 index;
       propNames.clear();
   
     //     //
     // Set the target and origin role values. Note that if these values are     // Set the target and origin role values. Note that if these values are
     // not set following the switch block, that implies that the origin class     // not set following the switch block, that implies that the origin class
Line 409 
Line 427 
                   ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;                   ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;
           }           }
           break;           break;
         case PG_ELEMENTCONFORMSTOPROFILE_RP_RP:
             propNames.append(CIMName("RegisteredName"));
             propertyList = CIMPropertyList(propNames);
             tmpInstance = localGetInstance(
                 context,
                 objectName,
                 propertyList);
             index = tmpInstance.findProperty("RegisteredName");
             if (index != PEG_NOT_FOUND)
             {
                 const CIMValue &tmpVal =
                     tmpInstance.getProperty(index).getValue();
                 if (!tmpVal.isNull())
                 {
                     tmpVal.get(profileName);
                 }
             }
             if (String::compareNoCase(profileName, String("SMI-S")) == 0)
             {
                 expectedTargetRole =
                     ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;
                 expectedOriginRole =
                     ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD;
             }
             else
             {
                 expectedTargetRole =
                     ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD;
                 expectedOriginRole =
                     ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;
             }
             break;
       case PG_SUBPROFILEREQUIRESPROFILE:       case PG_SUBPROFILEREQUIRESPROFILE:
           if(originClassEnum == PG_REGISTEREDPROFILE)           if(originClassEnum == PG_REGISTEREDPROFILE)
           {           {
Line 421 
Line 471 
               expectedOriginRole = PROPERTY_DEPENDENT;               expectedOriginRole = PROPERTY_DEPENDENT;
           }           }
           break;           break;
         case PG_REFERENCEDPROFILE:
             if (originClassEnum == PG_REGISTEREDSUBPROFILE)
             {
                 expectedTargetRole = PROPERTY_ANTECEDENT;
                 expectedOriginRole = PROPERTY_DEPENDENT;
             }
             else if (originClassEnum == PG_REGISTEREDPROFILE)
             {
                 if ((targetProperty.size() != 0) &&
                     (originProperty.size() != 0) &&
                     String::equalNoCase(targetProperty, originProperty))
                 {
                     return false;
                 }
                 if (targetProperty.size() != 0)
                 {
                     if (!(String::equalNoCase(targetProperty, "Antecedent") ||
                         String::equalNoCase(targetProperty, "Dependent") ))
                     {
                         return false;
                     }
                 }
                 if (originProperty.size() != 0)
                 {
                     if (!(String::equalNoCase(originProperty, "Antecedent") ||
                         String::equalNoCase(originProperty, "Dependent") ))
                     {
                         return false;
                     }
                 }
                 if (String::equalNoCase(originProperty, "Antecedent") &&
                     targetProperty.size() == 0)
                 {
                     targetProperty = String("Dependent");
                 }
                 if (String::equalNoCase(originProperty, "Dependent") &&
                     targetProperty.size() == 0)
                 {
                     targetProperty = String("Antecedent");
                 }
                 if (String::equalNoCase(targetProperty, "Antecedent") &&
                     originProperty.size() == 0)
                 {
                     originProperty = String("Dependent");
                 }
                 if (String::equalNoCase(targetProperty, "Dependent") &&
                     originProperty.size() == 0)
                 {
                     originProperty = String("Antecedent");
                 }
                 return true;
             }
             break;
       case PG_ELEMENTSOFTWAREIDENTITY:       case PG_ELEMENTSOFTWAREIDENTITY:
           if(originClassEnum == PG_SOFTWAREIDENTITY)           if(originClassEnum == PG_SOFTWAREIDENTITY)
           {           {
Line 541 
Line 644 
     CIMNamespaceName originNamespace(objectName.getNameSpace());     CIMNamespaceName originNamespace(objectName.getNameSpace());
  
     // Check that the association traversal request is valid     // Check that the association traversal request is valid
     if(validAssocClassForObject(assocClass, objectName.getClassName(),      if (validAssocClassForObject(
         originNamespace, originProperty, targetProperty))          context,
           assocClass,
           objectName,
           originNamespace,
           originProperty,
           targetProperty))
     {     {
         // retrieve all of the association class instances         // retrieve all of the association class instances
         Array<CIMInstance> localInstances = localEnumerateInstances(context,         Array<CIMInstance> localInstances = localEnumerateInstances(context,


Legend:
Removed from v.1.66  
changed lines
  Added in v.1.66.4.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2