(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 dl.meetei      1.43.10.1     /*
217                               * CIM communication mechanism instance building starts with this function
218                               * and completed by buildCIMXMLCommunicationMechanismInstance
219                               */
220                              void _buildCommInstSkeleton(
221                                  const Boolean isHttpsEnabled,
222                                  const Array<String> &ips,
223                                  const CIMClass &commMechClass,
224                                  Array<CIMInstance> &instances );
225 karl           1.12      
226 a.dunfey       1.22          CIMInstance buildCIMXMLCommunicationMechanismInstance(
227 tony           1.4               const String& namespaceType,
228 karl           1.14              const Uint16& accessProtocol,
229 a.dunfey       1.22              const String& IPAddress,
230                                  const CIMClass & commMechClass);
231                          
232                              Array<CIMInstance> enumCIMXMLCommunicationMechanismInstances();
233                          
234 thilo.boehm    1.40          Array<CIMInstance> enumHostedAccessPointInstances(
235                                  const OperationContext &opContext);
236 tony           1.4       
237 a.dunfey       1.22          CIMInstance getObjectManagerInstance();
238 tony           1.4       
239 thilo.boehm    1.40          CIMInstance getComputerSystemInstance(const OperationContext &opContext);
240 a.dunfey       1.22      
241 thilo.boehm    1.40          CIMInstance getHostedObjectManagerInstance(
242                                  const OperationContext &opContext);
243 a.dunfey       1.22      
244                              Array<CIMInstance> enumNamespaceInstances();
245 tony           1.4       
246 a.dunfey       1.22          CIMInstance buildNamespaceInstance(const String & nameSpace);
247 karl           1.18      
248 sahana.prabhakar 1.39          CIMInstance getNameSpaceInstance(const CIMObjectPath & ref);
249                            
250 a.dunfey         1.22          CIMObjectPath createNamespace(const CIMInstance & namespaceInstance);
251                                void deleteNamespace(const CIMObjectPath & instanceName);
252 tony             1.4       
253 venkat.puvvada   1.27          CIMObjectPath createProviderProfileCapabilityInstance(
254                                    const CIMInstance & profileInstance,
255                                    const OperationContext & context);
256                            
257                                void deleteProviderProfileCapabilityInstance(
258                                    const CIMObjectPath & instanceName,
259                                    const OperationContext & context);
260                            
261 a.dunfey         1.22          Array<CIMInstance> enumNamespaceInManagerInstances();
262 karl             1.6       
263 a.dunfey         1.22          Array<CIMInstance> enumCommMechanismForManagerInstances();
264 karl             1.19      
265 karl             1.6           void modifyObjectManagerInstance(const OperationContext & context,
266                                    const CIMObjectPath & instanceReference,
267                                    const CIMInstance& modifiedIns,
268                                    const Boolean includeQualifiers,
269 karl             1.19              const CIMPropertyList& propertyList);
270 karl             1.6       
271 a.dunfey         1.22          void extractSoftwareIdentityInfo(
272                                    const CIMInstance & providerInstance,
273                                    String & moduleName,
274                                    String & providerName,
275                                    String & version,
276                                    String & vendor,
277                                    Uint16 & majorVersion,
278                                    Uint16 & minorVersion,
279                                    Uint16 & revision,
280                                    Uint16 & build,
281                                    bool & extendedVersionSupplied,
282                                    String & interfaceType,
283                                    String & elementName,
284                                    String & caption);
285                            
286                                Array<CIMInstance> enumRegisteredProfileInstances();
287                                Array<CIMInstance> enumRegisteredSubProfileInstances();
288                                Array<CIMInstance> enumReferencedProfileInstances();
289 s.manicka        1.26          Array<CIMInstance> getProfilesForVersion(
290 kumpf            1.34              Array<CIMInstance>& subprofs,
291 venkat.puvvada   1.38              Uint16 regOrg,
292                                    Uint32 majorVer,
293                                    Uint32 minorVer,
294                                    Uint32 updateVer);
295 a.dunfey         1.22          Array<CIMInstance> enumElementConformsToProfileInstances(
296                                    const OperationContext & opContext,
297                                    const CIMNamespaceName & opNamespace);
298 s.manicka        1.26          Array<CIMInstance> enumElementConformsToProfileRPRPInstances(
299 kumpf            1.34              const OperationContext & opContext,
300 s.manicka        1.26              const CIMNamespaceName & opNamespace);
301 a.dunfey         1.22          Array<CIMInstance> enumSubProfileRequiresProfileInstances();
302                                Array<CIMInstance> enumSoftwareIdentityInstances();
303                                Array<CIMInstance> enumElementSoftwareIdentityInstances();
304 thilo.boehm      1.40          Array<CIMInstance> enumInstalledSoftwareIdentityInstances(
305                                    const OperationContext &opContext);
306 venkat.puvvada   1.37          Array<CIMInstance> enumDefaultSoftwareIdentityInstances();
307                            
308                                CIMInstance getSoftwareIdentityInstance(
309                                    const CIMObjectPath &ref);
310 a.dunfey         1.22      
311 venkat.puvvada   1.27          Array<CIMInstance> enumProviderProfileCapabilityInstances(
312                                    Boolean checkProviders = true,
313                                    Boolean includeQualifiers = false,
314                                    Boolean includeClassOrigin = false,
315                                    const CIMPropertyList &propertyList = CIMPropertyList());
316                            
317 venkat.puvvada   1.28      #ifdef PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT
318 venkat.puvvada   1.41          Array<CIMInstance> enumIndicationServiceInstances(
319                                    const OperationContext &opContext);
320 venkat.puvvada   1.28          Array<CIMInstance> enumElementCapabilityInstances(
321                                    const OperationContext & opContext);
322                                Array<CIMInstance> enumHostedIndicationServiceInstances(
323                                    const OperationContext & opContext);
324                                Array<CIMInstance> enumServiceAffectsElementInstances(
325                                    const OperationContext & opContext);
326                                CIMInstance buildAssociationInstance(
327                                    const CIMName &className,
328                                    const CIMName &propName1,
329                                    const CIMObjectPath &objPath1,
330                                    const CIMName &propName2,
331                                    const CIMObjectPath &objPath2);
332                            #endif
333 venkat.puvvada   1.27      
334 a.dunfey         1.22          CIMInstance buildRegisteredProfile(
335                                    const String & instanceId,
336                                    const String & profileName,
337                                    const String & profileVersion,
338                                    Uint16 profileOrganization,
339                                    const String & otherProfileOrganization,
340                                    const CIMClass & profileClass);
341                            
342                                CIMInstance buildDependencyInstance(
343                                    const String & antecedentId,
344                                    const CIMName & antecedentClass,
345                                    const String & dependentId,
346                                    const CIMName & dependentClass,
347                                    const CIMClass & dependencyClass);
348                            
349                                CIMInstance buildSoftwareIdentity(
350                                    const String & module,
351                                    const String & provider,
352                                    const String & vendor,
353                                    const String & version,
354                                    Uint16 majorVersion,
355 a.dunfey         1.22              Uint16 minorVersion,
356                                    Uint16 revisionNumber,
357                                    Uint16 buildNumber,
358                                    bool extendedVersionSupplied,
359                                    const String & interfaceType,
360                                    const String & elementName,
361                                    const String & caption);
362                            
363                                Array<CIMInstance> getProfileInstances(
364                                    const CIMName & profileType,
365                                    const Array<String> & defaultSniaProfiles);
366                            
367 venkat.puvvada   1.27          Array<CIMInstance> getDMTFProfileInstances(
368                                    const CIMName & profileType);
369                            
370 karl             1.15          // The following are internal equivalents of the operations
371                                // allowing the operations to call one another internally within
372                                // the provider.
373 karl             1.16          Array<CIMInstance> localEnumerateInstances(
374 karl             1.15              const OperationContext & context,
375                                    const CIMObjectPath & ref,
376 a.dunfey         1.22              const CIMPropertyList& propertyList=CIMPropertyList());
377 karl             1.15      
378 a.dunfey         1.22          Array<CIMInstance> localReferences(
379                                    const OperationContext & context,
380                                    const CIMObjectPath & objectName,
381                                    const CIMName & resultClass,
382                                    String & originRole,
383                                    String & targetRole,
384                                    const CIMPropertyList & propertyList=CIMPropertyList(),
385                                    const CIMName & targetClass=CIMName());
386 karl             1.15      
387 karl             1.17          CIMInstance localGetInstance(
388 karl             1.15              const OperationContext & context,
389                                    const CIMObjectPath & instanceName,
390                                    const CIMPropertyList & propertyList);
391 karl             1.18      
392 sahana.prabhakar 1.39          // This function fetches the other side of the reference.
393                                Array<CIMInstance> getReferencedInstances(
394                                    const Array<CIMInstance> &refs,
395 dl.meetei        1.43              const String &targetRole,
396 sahana.prabhakar 1.39              const OperationContext & context,
397                                    const CIMPropertyList & propertyList);
398                            
399 a.dunfey         1.22          void cacheProfileRegistrationInfo();
400                                void verifyCachedInfo();
401 venkat.puvvada   1.27          void initializeNamespaces();
402 a.dunfey         1.22      
403                                bool validAssocClassForObject(
404 s.manicka        1.26              const OperationContext & context,
405                                    const CIMName & assocClass, const CIMObjectPath & objectName,
406 a.dunfey         1.22              const CIMNamespaceName & opNamespace,
407                                    String & originProperty, String & targetProperty);
408                            
409 venkat.puvvada   1.27      #ifdef PEGASUS_ENABLE_SLP
410                                void sendUpdateRegMessageToSLPProvider(
411                                    const OperationContext & context);
412                            #endif
413                            
414 venkat.puvvada   1.36      
415 a.dunfey         1.22          // Repository Instance variable
416                                CIMOMHandle cimomHandle;
417                                CIMRepository * repository;
418 venkat.puvvada   1.36          ProviderRegistrationManager *providerRegistrationManager;
419 a.dunfey         1.22          String objectManagerName;
420                                String hostName;
421                                CIMClass profileCapabilitiesClass;
422                                CIMClass softwareIdentityClass;
423                                Array<Uint16> providerClassifications;
424                                Mutex interopMut;
425 a.dunfey         1.23          bool providerInitialized;
426 venkat.puvvada   1.27          AtomicInt updateProfileCache;
427 a.dunfey         1.22      
428                                // Registration info to cache
429                                Array<String> profileIds;
430                                Array<CIMNameArray> conformingElements;
431                                Array<CIMNamespaceArray> elementNamespaces;
432 s.kodali         1.29      
433                                Boolean enableSLP;
434 venkat.puvvada   1.30          String httpPort;
435                                String httpsPort;
436 thilo.boehm      1.42      
437                                // Cached CIM_ObjectManager instance.
438                                CIMInstance _CIMObjectManagerInst;
439 karl             1.1       };
440                            
441 a.dunfey         1.23      PEGASUS_NAMESPACE_END
442 karl             1.1       
443                            #endif // InteropProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2