(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            //==============================================================================
 31            
 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 karl  1.1  
 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            #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            
 58 a.dunfey 1.23 PEGASUS_NAMESPACE_BEGIN
 59 karl     1.1  
 60               /**
 61 a.dunfey 1.22  * The InteropProvider services the Interop classes of the DMTF CIM Schema
 62                * in the root/PG_InterOp namespace (as well as some related cross-namespace
 63                * associations in other namespaces). Through this implementation, combined
 64                * with the SLP provider and one or more vendor-supplied SMI providers, the
 65                * Pegasus WBEM Server is able to provide a fully-functional implementation of
 66                * the SMI-S Server profile (currently, version 1.1.0).
 67                *
 68                * The following is a list of the association and instance classes supported
 69                * by this provider in the root/PG_InterOp namespace:
 70                *
 71                *  PG_CIMXMLCommunicationMechanism (CIM_CIMXMLCommunicationMechanism)
 72                *  PG_CommMechanismForManager (CIM_CommMechanismForManager)
 73                *  PG_ComputerSystem (CIM_ComputerSystem)
 74                *  PG_ElementConformsToProfile (CIM_ElementConformsToProfile)
 75                *  PG_ElementSoftwareIdentity (CIM_ElementSoftwareIdentity)
 76                *  PG_HostedAccessPoint (CIM_HostedAccessPoint)
 77                *  PG_HostedObjectManager (CIM_HostedService)
 78                *  PG_InstalledSoftwareIdentity (CIM_InstalledSoftwareIdentity)
 79                *  PG_Namespace (CIM_Namespace)
 80                *  PG_NamespaceInManager (CIM_NamespaceInManager)
 81                *  PG_ObjectManager (CIM_ObjectManager)
 82 a.dunfey 1.22  *  PG_ReferencedProfile (CIM_ReferencedProfile)
 83                *  PG_RegisteredProfile (CIM_RegisteredProfile)
 84                *  PG_RegisteredSubProfile (CIM_RegisteredSubProfile)
 85                *  PG_SoftwareIdentity (CIM_SoftwareIdentity)
 86                *  PG_SubProfileRequiredProfile (CIM_SubProfileRequiresProfile)
 87                *
 88                */
 89               
 90               typedef Array<CIMName> CIMNameArray;
 91               typedef Array<CIMNamespaceName> CIMNamespaceArray;
 92 karl     1.1  
 93               class PEGASUS_INTEROPPROVIDER_LINKAGE InteropProvider :
 94 karl     1.25         public CIMInstanceProvider, public CIMAssociationProvider
 95 karl     1.1  {
 96               public:
 97               
 98 w.white  1.11     InteropProvider(CIMRepository* repository);
 99 karl     1.1      virtual ~InteropProvider()
100                   {
101 karl     1.25         PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
102                           "InteropProvider::~InteropProvider");
103 a.dunfey 1.22         PEG_METHOD_EXIT();
104 karl     1.1      }
105               
106 kumpf    1.24     // Note:  The initialize() and terminate() methods are not called for
107                   // Control Providers.
108                   void initialize(CIMOMHandle& handle) { }
109                   void terminate() { }
110               
111 karl     1.1      virtual void createInstance(
112 a.dunfey 1.22         const OperationContext & context,
113                       const CIMObjectPath & instanceReference,
114 karl     1.1          const CIMInstance& myInstance,
115 a.dunfey 1.22         ObjectPathResponseHandler & handler);
116 karl     1.1  
117                   virtual void deleteInstance(
118 a.dunfey 1.22         const OperationContext & context,
119 karl     1.1          const CIMObjectPath& instanceName,
120 a.dunfey 1.22         ResponseHandler & handler);
121 karl     1.1  
122                   virtual void getInstance(
123 a.dunfey 1.22         const OperationContext & context,
124 karl     1.1          const CIMObjectPath& instanceName,
125 a.dunfey 1.22         const Boolean includeQualifiers,
126                       const Boolean includeClassOrigin,
127 karl     1.1          const CIMPropertyList& propertyList,
128 a.dunfey 1.22         InstanceResponseHandler & handler);
129 karl     1.1  
130                   void modifyInstance(
131 a.dunfey 1.22         const OperationContext & context,
132                       const CIMObjectPath & instanceReference,
133 karl     1.1          const CIMInstance& modifiedIns,
134 a.dunfey 1.22         const Boolean includeQualifiers,
135 karl     1.1          const CIMPropertyList& propertyList,
136 a.dunfey 1.22         ResponseHandler & handler);
137 karl     1.1  
138                   virtual void enumerateInstances(
139 a.dunfey 1.22         const OperationContext & context,
140                       const CIMObjectPath & ref,
141                       const Boolean includeQualifiers,
142                       const Boolean includeClassOrigin,
143 karl     1.1          const CIMPropertyList& propertyList,
144 a.dunfey 1.22         InstanceResponseHandler & handler);
145 karl     1.1  
146                   virtual void enumerateInstanceNames(
147 a.dunfey 1.22         const OperationContext & context,
148                       const CIMObjectPath & classReference,
149                       ObjectPathResponseHandler & handler);
150               
151               
152                   // CIMAssociationProvider interface
153                   virtual void associators(
154                       const OperationContext & context,
155                       const CIMObjectPath & objectName,
156                       const CIMName & associationClass,
157                       const CIMName & resultClass,
158                       const String & role,
159                       const String & resultRole,
160                       const Boolean includeQualifiers,
161                       const Boolean includeClassOrigin,
162                       const CIMPropertyList & propertyList,
163                       ObjectResponseHandler & handler);
164               
165                   virtual void associatorNames(
166                       const OperationContext & context,
167                       const CIMObjectPath & objectName,
168 a.dunfey 1.22         const CIMName & associationClass,
169                       const CIMName & resultClass,
170                       const String & role,
171                       const String & resultRole,
172                       ObjectPathResponseHandler & handler);
173               
174                   virtual void references(
175                       const OperationContext & context,
176                       const CIMObjectPath & objectName,
177                       const CIMName & resultClass,
178                       const String & role,
179                       const Boolean includeQualifiers,
180                       const Boolean includeClassOrigin,
181                       const CIMPropertyList & propertyList,
182                       ObjectResponseHandler & handler);
183               
184                   virtual void referenceNames(
185                       const OperationContext & context,
186                       const CIMObjectPath & objectName,
187                       const CIMName & resultClass,
188                       const String & role,
189 karl     1.1          ObjectPathResponseHandler & handler);
190               
191               private:
192               
193 a.dunfey 1.23     void initProvider();
194               
195 a.dunfey 1.22     CIMInstance buildInstanceSkeleton(
196                       const CIMNamespaceName & nameSpace,
197 karl     1.13         const CIMName& className,
198                       CIMClass& returnedClass);
199 karl     1.12 
200 a.dunfey 1.22     CIMInstance buildCIMXMLCommunicationMechanismInstance(
201 tony     1.4          const String& namespaceType,
202 karl     1.14         const Uint16& accessProtocol,
203 a.dunfey 1.22         const String& IPAddress,
204                       const CIMClass & commMechClass);
205               
206                   Array<CIMInstance> enumCIMXMLCommunicationMechanismInstances();
207               
208                   Array<CIMInstance> enumHostedAccessPointInstances();
209 tony     1.4  
210 a.dunfey 1.22     CIMInstance getObjectManagerInstance();
211 tony     1.4  
212 a.dunfey 1.22     CIMInstance getComputerSystemInstance();
213               
214                   CIMInstance getHostedObjectManagerInstance();
215               
216                   Array<CIMInstance> enumNamespaceInstances();
217 tony     1.4  
218 a.dunfey 1.22     CIMInstance buildNamespaceInstance(const String & nameSpace);
219 karl     1.18 
220 a.dunfey 1.22     CIMObjectPath createNamespace(const CIMInstance & namespaceInstance);
221                   void deleteNamespace(const CIMObjectPath & instanceName);
222 tony     1.4  
223 a.dunfey 1.22     Array<CIMInstance> enumNamespaceInManagerInstances();
224 karl     1.6  
225 a.dunfey 1.22     Array<CIMInstance> enumCommMechanismForManagerInstances();
226 karl     1.19 
227 karl     1.6      void modifyObjectManagerInstance(const OperationContext & context,
228                       const CIMObjectPath & instanceReference,
229                       const CIMInstance& modifiedIns,
230                       const Boolean includeQualifiers,
231 karl     1.19         const CIMPropertyList& propertyList);
232 karl     1.6  
233 a.dunfey 1.22     void extractSoftwareIdentityInfo(
234                       const CIMInstance & providerInstance,
235                       String & moduleName,
236                       String & providerName,
237                       String & version,
238                       String & vendor,
239                       Uint16 & majorVersion,
240                       Uint16 & minorVersion,
241                       Uint16 & revision,
242                       Uint16 & build,
243                       bool & extendedVersionSupplied,
244                       String & interfaceType,
245                       String & elementName,
246                       String & caption);
247               
248                   Array<CIMInstance> enumRegisteredProfileInstances();
249                   Array<CIMInstance> enumRegisteredSubProfileInstances();
250                   Array<CIMInstance> enumReferencedProfileInstances();
251                   Array<CIMInstance> enumElementConformsToProfileInstances(
252                       const OperationContext & opContext,
253                       const CIMNamespaceName & opNamespace);
254 a.dunfey 1.22     Array<CIMInstance> enumSubProfileRequiresProfileInstances();
255                   Array<CIMInstance> enumSoftwareIdentityInstances();
256                   Array<CIMInstance> enumElementSoftwareIdentityInstances();
257                   Array<CIMInstance> enumInstalledSoftwareIdentityInstances();
258               
259                   CIMInstance buildRegisteredProfile(
260                       const String & instanceId,
261                       const String & profileName,
262                       const String & profileVersion,
263                       Uint16 profileOrganization,
264                       const String & otherProfileOrganization,
265                       const CIMClass & profileClass);
266               
267                   CIMInstance buildDependencyInstance(
268                       const String & antecedentId,
269                       const CIMName & antecedentClass,
270                       const String & dependentId,
271                       const CIMName & dependentClass,
272                       const CIMClass & dependencyClass);
273               
274                   CIMInstance buildSoftwareIdentity(
275 a.dunfey 1.22         const String & module,
276                       const String & provider,
277                       const String & vendor,
278                       const String & version,
279                       Uint16 majorVersion,
280                       Uint16 minorVersion,
281                       Uint16 revisionNumber,
282                       Uint16 buildNumber,
283                       bool extendedVersionSupplied,
284                       const String & interfaceType,
285                       const String & elementName,
286                       const String & caption);
287               
288                   Array<CIMInstance> getProfileInstances(
289                       const CIMName & profileType,
290                       const Array<String> & defaultSniaProfiles);
291               
292 karl     1.15     // The following are internal equivalents of the operations
293                   // allowing the operations to call one another internally within
294                   // the provider.
295 karl     1.16     Array<CIMInstance> localEnumerateInstances(
296 karl     1.15         const OperationContext & context,
297                       const CIMObjectPath & ref,
298 a.dunfey 1.22         const CIMPropertyList& propertyList=CIMPropertyList());
299 karl     1.15 
300 a.dunfey 1.22     Array<CIMInstance> localReferences(
301                       const OperationContext & context,
302                       const CIMObjectPath & objectName,
303                       const CIMName & resultClass,
304                       String & originRole,
305                       String & targetRole,
306                       const CIMPropertyList & propertyList=CIMPropertyList(),
307                       const CIMName & targetClass=CIMName());
308 karl     1.15 
309 karl     1.17     CIMInstance localGetInstance(
310 karl     1.15         const OperationContext & context,
311                       const CIMObjectPath & instanceName,
312                       const CIMPropertyList & propertyList);
313 karl     1.18 
314 a.dunfey 1.22     void cacheProfileRegistrationInfo();
315                   void verifyCachedInfo();
316               
317                   bool validAssocClassForObject(
318                       const CIMName & assocClass, const CIMName & originClass,
319                       const CIMNamespaceName & opNamespace,
320                       String & originProperty, String & targetProperty);
321               
322                   // Repository Instance variable
323                   CIMOMHandle cimomHandle;
324                   CIMRepository * repository;
325                   String objectManagerName;
326                   String hostName;
327                   CIMClass profileCapabilitiesClass;
328                   CIMClass softwareIdentityClass;
329                   Array<Uint16> providerClassifications;
330                   Mutex interopMut;
331 a.dunfey 1.23     bool providerInitialized;
332 a.dunfey 1.22 
333                   // Registration info to cache
334                   Array<String> profileIds;
335                   Array<CIMNameArray> conformingElements;
336                   Array<CIMNamespaceArray> elementNamespaces;
337 karl     1.1  };
338               
339 a.dunfey 1.23 PEGASUS_NAMESPACE_END
340 karl     1.1  
341               #endif // InteropProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2