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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2