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

  1 martin 1.32 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.33 //
  3 martin 1.32 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.33 //
 10 martin 1.32 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.33 //
 17 martin 1.32 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.33 //
 20 martin 1.32 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.33 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.32 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.33 //
 28 martin 1.32 //////////////////////////////////////////////////////////////////////////
 29 karl   1.1  
 30             
 31             #ifndef InteropProvider_h
 32             #define InteropProvider_h
 33             
 34             ///////////////////////////////////////////////////////////////////////////////
 35             //  Interop Provider
 36             ///////////////////////////////////////////////////////////////////////////////
 37             
 38             #include <Pegasus/Common/Config.h>
 39             #include <Pegasus/ControlProviders/InteropProvider/Linkage.h>
 40             
 41             #include <Pegasus/Common/String.h>
 42             #include <Pegasus/Common/System.h>
 43             #include <Pegasus/Common/ArrayInternal.h>
 44             #include <Pegasus/Common/CIMType.h>
 45             #include <Pegasus/Common/CIMInstance.h>
 46             #include <Pegasus/Common/CIMObjectPath.h>
 47             #include <Pegasus/Common/InternalException.h>
 48             #include <Pegasus/Common/CIMStatusCode.h>
 49             #include <Pegasus/Common/Tracer.h>
 50 karl   1.1  #include <Pegasus/Config/ConfigManager.h>
 51             
 52             #include <Pegasus/Repository/CIMRepository.h>
 53             #include <Pegasus/Provider/CIMInstanceProvider.h>
 54             #include <Pegasus/Provider/CIMAssociationProvider.h>
 55 venkat.puvvada 1.27 #include <Pegasus/Provider/CIMMethodProvider.h>
 56 venkat.puvvada 1.38 #include <Pegasus/General/VersionUtil.h>
 57 karl           1.1  
 58 venkat.puvvada 1.36 #include \
 59                         <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
 60                     
 61 a.dunfey       1.23 PEGASUS_NAMESPACE_BEGIN
 62 karl           1.1  
 63                     /**
 64 a.dunfey       1.22  * The InteropProvider services the Interop classes of the DMTF CIM Schema
 65                      * in the root/PG_InterOp namespace (as well as some related cross-namespace
 66                      * associations in other namespaces). Through this implementation, combined
 67                      * with the SLP provider and one or more vendor-supplied SMI providers, the
 68                      * Pegasus WBEM Server is able to provide a fully-functional implementation of
 69                      * the SMI-S Server profile (currently, version 1.1.0).
 70                      *
 71                      * The following is a list of the association and instance classes supported
 72                      * by this provider in the root/PG_InterOp namespace:
 73                      *
 74                      *  PG_CIMXMLCommunicationMechanism (CIM_CIMXMLCommunicationMechanism)
 75                      *  PG_CommMechanismForManager (CIM_CommMechanismForManager)
 76                      *  PG_ComputerSystem (CIM_ComputerSystem)
 77                      *  PG_ElementConformsToProfile (CIM_ElementConformsToProfile)
 78                      *  PG_ElementSoftwareIdentity (CIM_ElementSoftwareIdentity)
 79                      *  PG_HostedAccessPoint (CIM_HostedAccessPoint)
 80                      *  PG_HostedObjectManager (CIM_HostedService)
 81                      *  PG_InstalledSoftwareIdentity (CIM_InstalledSoftwareIdentity)
 82                      *  PG_Namespace (CIM_Namespace)
 83                      *  PG_NamespaceInManager (CIM_NamespaceInManager)
 84                      *  PG_ObjectManager (CIM_ObjectManager)
 85 a.dunfey       1.22  *  PG_ReferencedProfile (CIM_ReferencedProfile)
 86                      *  PG_RegisteredProfile (CIM_RegisteredProfile)
 87                      *  PG_RegisteredSubProfile (CIM_RegisteredSubProfile)
 88                      *  PG_SoftwareIdentity (CIM_SoftwareIdentity)
 89                      *  PG_SubProfileRequiredProfile (CIM_SubProfileRequiresProfile)
 90                      *
 91                      */
 92                     
 93                     typedef Array<CIMName> CIMNameArray;
 94                     typedef Array<CIMNamespaceName> CIMNamespaceArray;
 95 karl           1.1  
 96                     class PEGASUS_INTEROPPROVIDER_LINKAGE InteropProvider :
 97 kumpf          1.34         public CIMInstanceProvider,
 98 venkat.puvvada 1.27         public CIMAssociationProvider,
 99                             public CIMMethodProvider
100 karl           1.1  {
101                     public:
102                     
103 venkat.puvvada 1.36     InteropProvider(
104                             CIMRepository* repository,
105                             ProviderRegistrationManager* provRegManager);
106                     
107 karl           1.1      virtual ~InteropProvider()
108                         {
109 karl           1.25         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
110                                 "InteropProvider::~InteropProvider");
111 a.dunfey       1.22         PEG_METHOD_EXIT();
112 karl           1.1      }
113                     
114 kumpf          1.24     // Note:  The initialize() and terminate() methods are not called for
115                         // Control Providers.
116                         void initialize(CIMOMHandle& handle) { }
117                         void terminate() { }
118                     
119 karl           1.1      virtual void createInstance(
120 a.dunfey       1.22         const OperationContext & context,
121                             const CIMObjectPath & instanceReference,
122 karl           1.1          const CIMInstance& myInstance,
123 a.dunfey       1.22         ObjectPathResponseHandler & handler);
124 karl           1.1  
125                         virtual void deleteInstance(
126 a.dunfey       1.22         const OperationContext & context,
127 karl           1.1          const CIMObjectPath& instanceName,
128 a.dunfey       1.22         ResponseHandler & handler);
129 karl           1.1  
130                         virtual void getInstance(
131 a.dunfey       1.22         const OperationContext & context,
132 karl           1.1          const CIMObjectPath& instanceName,
133 a.dunfey       1.22         const Boolean includeQualifiers,
134                             const Boolean includeClassOrigin,
135 karl           1.1          const CIMPropertyList& propertyList,
136 a.dunfey       1.22         InstanceResponseHandler & handler);
137 karl           1.1  
138                         void modifyInstance(
139 a.dunfey       1.22         const OperationContext & context,
140                             const CIMObjectPath & instanceReference,
141 karl           1.1          const CIMInstance& modifiedIns,
142 a.dunfey       1.22         const Boolean includeQualifiers,
143 karl           1.1          const CIMPropertyList& propertyList,
144 a.dunfey       1.22         ResponseHandler & handler);
145 karl           1.1  
146                         virtual void enumerateInstances(
147 a.dunfey       1.22         const OperationContext & context,
148                             const CIMObjectPath & ref,
149                             const Boolean includeQualifiers,
150                             const Boolean includeClassOrigin,
151 karl           1.1          const CIMPropertyList& propertyList,
152 a.dunfey       1.22         InstanceResponseHandler & handler);
153 karl           1.1  
154                         virtual void enumerateInstanceNames(
155 a.dunfey       1.22         const OperationContext & context,
156                             const CIMObjectPath & classReference,
157                             ObjectPathResponseHandler & handler);
158                     
159                     
160                         // CIMAssociationProvider interface
161                         virtual void associators(
162                             const OperationContext & context,
163                             const CIMObjectPath & objectName,
164                             const CIMName & associationClass,
165                             const CIMName & resultClass,
166                             const String & role,
167                             const String & resultRole,
168                             const Boolean includeQualifiers,
169                             const Boolean includeClassOrigin,
170                             const CIMPropertyList & propertyList,
171                             ObjectResponseHandler & handler);
172                     
173                         virtual void associatorNames(
174                             const OperationContext & context,
175                             const CIMObjectPath & objectName,
176 a.dunfey       1.22         const CIMName & associationClass,
177                             const CIMName & resultClass,
178                             const String & role,
179                             const String & resultRole,
180                             ObjectPathResponseHandler & handler);
181                     
182                         virtual void references(
183                             const OperationContext & context,
184                             const CIMObjectPath & objectName,
185                             const CIMName & resultClass,
186                             const String & role,
187                             const Boolean includeQualifiers,
188                             const Boolean includeClassOrigin,
189                             const CIMPropertyList & propertyList,
190                             ObjectResponseHandler & handler);
191                     
192                         virtual void referenceNames(
193                             const OperationContext & context,
194                             const CIMObjectPath & objectName,
195                             const CIMName & resultClass,
196                             const String & role,
197 karl           1.1          ObjectPathResponseHandler & handler);
198                     
199 venkat.puvvada 1.27     // CIMMethodProvider interface
200                         virtual void invokeMethod(
201                             const OperationContext & context,
202                             const CIMObjectPath & objectReference,
203                             const CIMName & methodName,
204                             const Array<CIMParamValue> & inParameters,
205                             MethodResultResponseHandler & handler);
206                     
207 karl           1.1  private:
208                     
209 a.dunfey       1.23     void initProvider();
210                     
211 a.dunfey       1.22     CIMInstance buildInstanceSkeleton(
212                             const CIMNamespaceName & nameSpace,
213 karl           1.13         const CIMName& className,
214 kumpf          1.31         Boolean includeQualifiers,
215 karl           1.13         CIMClass& returnedClass);
216 karl           1.12 
217 a.dunfey       1.22     CIMInstance buildCIMXMLCommunicationMechanismInstance(
218 tony           1.4          const String& namespaceType,
219 karl           1.14         const Uint16& accessProtocol,
220 a.dunfey       1.22         const String& IPAddress,
221                             const CIMClass & commMechClass);
222                     
223                         Array<CIMInstance> enumCIMXMLCommunicationMechanismInstances();
224                     
225 thilo.boehm    1.40     Array<CIMInstance> enumHostedAccessPointInstances(
226                             const OperationContext &opContext);
227 tony           1.4  
228 a.dunfey       1.22     CIMInstance getObjectManagerInstance();
229 tony           1.4  
230 thilo.boehm    1.40     CIMInstance getComputerSystemInstance(const OperationContext &opContext);
231 a.dunfey       1.22 
232 thilo.boehm    1.40     CIMInstance getHostedObjectManagerInstance(
233                             const OperationContext &opContext);
234 a.dunfey       1.22 
235                         Array<CIMInstance> enumNamespaceInstances();
236 tony           1.4  
237 a.dunfey       1.22     CIMInstance buildNamespaceInstance(const String & nameSpace);
238 karl           1.18 
239 sahana.prabhakar 1.39     CIMInstance getNameSpaceInstance(const CIMObjectPath & ref);
240                       
241 a.dunfey         1.22     CIMObjectPath createNamespace(const CIMInstance & namespaceInstance);
242                           void deleteNamespace(const CIMObjectPath & instanceName);
243 tony             1.4  
244 venkat.puvvada   1.27     CIMObjectPath createProviderProfileCapabilityInstance(
245                               const CIMInstance & profileInstance,
246                               const OperationContext & context);
247                       
248                           void deleteProviderProfileCapabilityInstance(
249                               const CIMObjectPath & instanceName,
250                               const OperationContext & context);
251                       
252 a.dunfey         1.22     Array<CIMInstance> enumNamespaceInManagerInstances();
253 karl             1.6  
254 a.dunfey         1.22     Array<CIMInstance> enumCommMechanismForManagerInstances();
255 karl             1.19 
256 karl             1.6      void modifyObjectManagerInstance(const OperationContext & context,
257                               const CIMObjectPath & instanceReference,
258                               const CIMInstance& modifiedIns,
259                               const Boolean includeQualifiers,
260 karl             1.19         const CIMPropertyList& propertyList);
261 karl             1.6  
262 a.dunfey         1.22     void extractSoftwareIdentityInfo(
263                               const CIMInstance & providerInstance,
264                               String & moduleName,
265                               String & providerName,
266                               String & version,
267                               String & vendor,
268                               Uint16 & majorVersion,
269                               Uint16 & minorVersion,
270                               Uint16 & revision,
271                               Uint16 & build,
272                               bool & extendedVersionSupplied,
273                               String & interfaceType,
274                               String & elementName,
275                               String & caption);
276                       
277                           Array<CIMInstance> enumRegisteredProfileInstances();
278                           Array<CIMInstance> enumRegisteredSubProfileInstances();
279                           Array<CIMInstance> enumReferencedProfileInstances();
280 s.manicka        1.26     Array<CIMInstance> getProfilesForVersion(
281 kumpf            1.34         Array<CIMInstance>& subprofs,
282 venkat.puvvada   1.38         Uint16 regOrg,
283                               Uint32 majorVer,
284                               Uint32 minorVer,
285                               Uint32 updateVer);
286 a.dunfey         1.22     Array<CIMInstance> enumElementConformsToProfileInstances(
287                               const OperationContext & opContext,
288                               const CIMNamespaceName & opNamespace);
289 s.manicka        1.26     Array<CIMInstance> enumElementConformsToProfileRPRPInstances(
290 kumpf            1.34         const OperationContext & opContext,
291 s.manicka        1.26         const CIMNamespaceName & opNamespace);
292 a.dunfey         1.22     Array<CIMInstance> enumSubProfileRequiresProfileInstances();
293                           Array<CIMInstance> enumSoftwareIdentityInstances();
294                           Array<CIMInstance> enumElementSoftwareIdentityInstances();
295 thilo.boehm      1.40     Array<CIMInstance> enumInstalledSoftwareIdentityInstances(
296                               const OperationContext &opContext);
297 venkat.puvvada   1.37     Array<CIMInstance> enumDefaultSoftwareIdentityInstances();
298                       
299                           CIMInstance getSoftwareIdentityInstance(
300                               const CIMObjectPath &ref);
301 a.dunfey         1.22 
302 venkat.puvvada   1.27     Array<CIMInstance> enumProviderProfileCapabilityInstances(
303                               Boolean checkProviders = true,
304                               Boolean includeQualifiers = false,
305                               Boolean includeClassOrigin = false,
306                               const CIMPropertyList &propertyList = CIMPropertyList());
307                       
308 venkat.puvvada   1.28 #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT
309 karl             1.40.4.1     Array<CIMInstance> enumIndicationServiceInstances(
310                                   const OperationContext &opContext);
311 venkat.puvvada   1.28         Array<CIMInstance> enumElementCapabilityInstances(
312                                   const OperationContext & opContext);
313                               Array<CIMInstance> enumHostedIndicationServiceInstances(
314                                   const OperationContext & opContext);
315                               Array<CIMInstance> enumServiceAffectsElementInstances(
316                                   const OperationContext & opContext);
317                               CIMInstance buildAssociationInstance(
318                                   const CIMName &className,
319                                   const CIMName &propName1,
320                                   const CIMObjectPath &objPath1,
321                                   const CIMName &propName2,
322                                   const CIMObjectPath &objPath2);
323                           #endif
324 venkat.puvvada   1.27     
325 a.dunfey         1.22         CIMInstance buildRegisteredProfile(
326                                   const String & instanceId,
327                                   const String & profileName,
328                                   const String & profileVersion,
329                                   Uint16 profileOrganization,
330                                   const String & otherProfileOrganization,
331                                   const CIMClass & profileClass);
332                           
333                               CIMInstance buildDependencyInstance(
334                                   const String & antecedentId,
335                                   const CIMName & antecedentClass,
336                                   const String & dependentId,
337                                   const CIMName & dependentClass,
338                                   const CIMClass & dependencyClass);
339                           
340                               CIMInstance buildSoftwareIdentity(
341                                   const String & module,
342                                   const String & provider,
343                                   const String & vendor,
344                                   const String & version,
345                                   Uint16 majorVersion,
346 a.dunfey         1.22             Uint16 minorVersion,
347                                   Uint16 revisionNumber,
348                                   Uint16 buildNumber,
349                                   bool extendedVersionSupplied,
350                                   const String & interfaceType,
351                                   const String & elementName,
352                                   const String & caption);
353                           
354                               Array<CIMInstance> getProfileInstances(
355                                   const CIMName & profileType,
356                                   const Array<String> & defaultSniaProfiles);
357                           
358 venkat.puvvada   1.27         Array<CIMInstance> getDMTFProfileInstances(
359                                   const CIMName & profileType);
360                           
361 karl             1.15         // The following are internal equivalents of the operations
362                               // allowing the operations to call one another internally within
363                               // the provider.
364 karl             1.16         Array<CIMInstance> localEnumerateInstances(
365 karl             1.15             const OperationContext & context,
366                                   const CIMObjectPath & ref,
367 a.dunfey         1.22             const CIMPropertyList& propertyList=CIMPropertyList());
368 karl             1.15     
369 a.dunfey         1.22         Array<CIMInstance> localReferences(
370                                   const OperationContext & context,
371                                   const CIMObjectPath & objectName,
372                                   const CIMName & resultClass,
373                                   String & originRole,
374                                   String & targetRole,
375                                   const CIMPropertyList & propertyList=CIMPropertyList(),
376                                   const CIMName & targetClass=CIMName());
377 karl             1.15     
378 karl             1.17         CIMInstance localGetInstance(
379 karl             1.15             const OperationContext & context,
380                                   const CIMObjectPath & instanceName,
381                                   const CIMPropertyList & propertyList);
382 karl             1.18     
383 sahana.prabhakar 1.39         // This function fetches the other side of the reference.
384                               Array<CIMInstance> getReferencedInstances(
385                                   const Array<CIMInstance> &refs,
386 karl             1.40.4.2         const String &targetRole,
387 sahana.prabhakar 1.39             const OperationContext & context,
388                                   const CIMPropertyList & propertyList);
389                           
390 a.dunfey         1.22         void cacheProfileRegistrationInfo();
391                               void verifyCachedInfo();
392 venkat.puvvada   1.27         void initializeNamespaces();
393 a.dunfey         1.22     
394                               bool validAssocClassForObject(
395 s.manicka        1.26             const OperationContext & context,
396                                   const CIMName & assocClass, const CIMObjectPath & objectName,
397 a.dunfey         1.22             const CIMNamespaceName & opNamespace,
398                                   String & originProperty, String & targetProperty);
399                           
400 venkat.puvvada   1.27     #ifdef PEGASUS_ENABLE_SLP
401                               void sendUpdateRegMessageToSLPProvider(
402                                   const OperationContext & context);
403                           #endif
404                           
405 venkat.puvvada   1.36     
406 a.dunfey         1.22         // Repository Instance variable
407                               CIMOMHandle cimomHandle;
408                               CIMRepository * repository;
409 venkat.puvvada   1.36         ProviderRegistrationManager *providerRegistrationManager;
410 a.dunfey         1.22         String objectManagerName;
411                               String hostName;
412                               CIMClass profileCapabilitiesClass;
413                               CIMClass softwareIdentityClass;
414                               Array<Uint16> providerClassifications;
415                               Mutex interopMut;
416 a.dunfey         1.23         bool providerInitialized;
417 venkat.puvvada   1.27         AtomicInt updateProfileCache;
418 a.dunfey         1.22     
419                               // Registration info to cache
420                               Array<String> profileIds;
421                               Array<CIMNameArray> conformingElements;
422                               Array<CIMNamespaceArray> elementNamespaces;
423 s.kodali         1.29     
424                               Boolean enableSLP;
425 venkat.puvvada   1.30         String httpPort;
426                               String httpsPort;
427 karl             1.40.4.2 
428                               // Cached CIM_ObjectManager instance.
429                               CIMInstance _CIMObjectManagerInst;
430 karl             1.1      };
431                           
432 a.dunfey         1.23     PEGASUS_NAMESPACE_END
433 karl             1.1      
434                           #endif // InteropProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2