(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.25.18.1 //=============================================================================
 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                     
 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 s.manicka 1.25.18.1     Array<CIMInstance> getProfilesForVersion(
252                             Array<CIMInstance>& subprofs, 
253                             const String version);
254 a.dunfey  1.22          Array<CIMInstance> enumElementConformsToProfileInstances(
255                             const OperationContext & opContext,
256                             const CIMNamespaceName & opNamespace);
257 s.manicka 1.25.18.1     Array<CIMInstance> enumElementConformsToProfileRPRPInstances(
258                             const OperationContext & opContext, 
259                             const CIMNamespaceName & opNamespace);
260 a.dunfey  1.22          Array<CIMInstance> enumSubProfileRequiresProfileInstances();
261                         Array<CIMInstance> enumSoftwareIdentityInstances();
262                         Array<CIMInstance> enumElementSoftwareIdentityInstances();
263                         Array<CIMInstance> enumInstalledSoftwareIdentityInstances();
264                     
265                         CIMInstance buildRegisteredProfile(
266                             const String & instanceId,
267                             const String & profileName,
268                             const String & profileVersion,
269                             Uint16 profileOrganization,
270                             const String & otherProfileOrganization,
271                             const CIMClass & profileClass);
272                     
273                         CIMInstance buildDependencyInstance(
274                             const String & antecedentId,
275                             const CIMName & antecedentClass,
276                             const String & dependentId,
277                             const CIMName & dependentClass,
278                             const CIMClass & dependencyClass);
279                     
280                         CIMInstance buildSoftwareIdentity(
281 a.dunfey  1.22              const String & module,
282                             const String & provider,
283                             const String & vendor,
284                             const String & version,
285                             Uint16 majorVersion,
286                             Uint16 minorVersion,
287                             Uint16 revisionNumber,
288                             Uint16 buildNumber,
289                             bool extendedVersionSupplied,
290                             const String & interfaceType,
291                             const String & elementName,
292                             const String & caption);
293                     
294                         Array<CIMInstance> getProfileInstances(
295                             const CIMName & profileType,
296                             const Array<String> & defaultSniaProfiles);
297                     
298 karl      1.15          // The following are internal equivalents of the operations
299                         // allowing the operations to call one another internally within
300                         // the provider.
301 karl      1.16          Array<CIMInstance> localEnumerateInstances(
302 karl      1.15              const OperationContext & context,
303                             const CIMObjectPath & ref,
304 a.dunfey  1.22              const CIMPropertyList& propertyList=CIMPropertyList());
305 karl      1.15      
306 a.dunfey  1.22          Array<CIMInstance> localReferences(
307                             const OperationContext & context,
308                             const CIMObjectPath & objectName,
309                             const CIMName & resultClass,
310                             String & originRole,
311                             String & targetRole,
312                             const CIMPropertyList & propertyList=CIMPropertyList(),
313                             const CIMName & targetClass=CIMName());
314 karl      1.15      
315 karl      1.17          CIMInstance localGetInstance(
316 karl      1.15              const OperationContext & context,
317                             const CIMObjectPath & instanceName,
318                             const CIMPropertyList & propertyList);
319 karl      1.18      
320 a.dunfey  1.22          void cacheProfileRegistrationInfo();
321                         void verifyCachedInfo();
322                     
323                         bool validAssocClassForObject(
324 s.manicka 1.25.18.1         const OperationContext & context,
325                             const CIMName & assocClass, const CIMObjectPath & objectName,
326 a.dunfey  1.22              const CIMNamespaceName & opNamespace,
327                             String & originProperty, String & targetProperty);
328                     
329                         // Repository Instance variable
330                         CIMOMHandle cimomHandle;
331                         CIMRepository * repository;
332                         String objectManagerName;
333                         String hostName;
334                         CIMClass profileCapabilitiesClass;
335                         CIMClass softwareIdentityClass;
336                         Array<Uint16> providerClassifications;
337                         Mutex interopMut;
338 a.dunfey  1.23          bool providerInitialized;
339 a.dunfey  1.22      
340                         // Registration info to cache
341                         Array<String> profileIds;
342                         Array<CIMNameArray> conformingElements;
343                         Array<CIMNamespaceArray> elementNamespaces;
344 karl      1.1       };
345                     
346 a.dunfey  1.23      PEGASUS_NAMESPACE_END
347 karl      1.1       
348                     #endif // InteropProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2