(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 mike  1.25.16.1 #include <Pegasus/Common/Mutex.h>
 53 karl  1.1       #include <Pegasus/Config/ConfigManager.h>
 54                 
 55                 #include <Pegasus/Repository/CIMRepository.h>
 56                 #include <Pegasus/Provider/CIMInstanceProvider.h>
 57                 #include <Pegasus/Provider/CIMAssociationProvider.h>
 58                 
 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 karl     1.25              public CIMInstanceProvider, public CIMAssociationProvider
 96 karl     1.1       {
 97                    public:
 98                    
 99 w.white  1.11          InteropProvider(CIMRepository* repository);
100 karl     1.1           virtual ~InteropProvider()
101                        {
102 karl     1.25              PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,
103                                "InteropProvider::~InteropProvider");
104 a.dunfey 1.22              PEG_METHOD_EXIT();
105 karl     1.1           }
106                    
107 kumpf    1.24          // Note:  The initialize() and terminate() methods are not called for
108                        // Control Providers.
109                        void initialize(CIMOMHandle& handle) { }
110                        void terminate() { }
111                    
112 karl     1.1           virtual void createInstance(
113 a.dunfey 1.22              const OperationContext & context,
114                            const CIMObjectPath & instanceReference,
115 karl     1.1               const CIMInstance& myInstance,
116 a.dunfey 1.22              ObjectPathResponseHandler & handler);
117 karl     1.1       
118                        virtual void deleteInstance(
119 a.dunfey 1.22              const OperationContext & context,
120 karl     1.1               const CIMObjectPath& instanceName,
121 a.dunfey 1.22              ResponseHandler & handler);
122 karl     1.1       
123                        virtual void getInstance(
124 a.dunfey 1.22              const OperationContext & context,
125 karl     1.1               const CIMObjectPath& instanceName,
126 a.dunfey 1.22              const Boolean includeQualifiers,
127                            const Boolean includeClassOrigin,
128 karl     1.1               const CIMPropertyList& propertyList,
129 a.dunfey 1.22              InstanceResponseHandler & handler);
130 karl     1.1       
131                        void modifyInstance(
132 a.dunfey 1.22              const OperationContext & context,
133                            const CIMObjectPath & instanceReference,
134 karl     1.1               const CIMInstance& modifiedIns,
135 a.dunfey 1.22              const Boolean includeQualifiers,
136 karl     1.1               const CIMPropertyList& propertyList,
137 a.dunfey 1.22              ResponseHandler & handler);
138 karl     1.1       
139                        virtual void enumerateInstances(
140 a.dunfey 1.22              const OperationContext & context,
141                            const CIMObjectPath & ref,
142                            const Boolean includeQualifiers,
143                            const Boolean includeClassOrigin,
144 karl     1.1               const CIMPropertyList& propertyList,
145 a.dunfey 1.22              InstanceResponseHandler & handler);
146 karl     1.1       
147                        virtual void enumerateInstanceNames(
148 a.dunfey 1.22              const OperationContext & context,
149                            const CIMObjectPath & classReference,
150                            ObjectPathResponseHandler & handler);
151                    
152                    
153                        // CIMAssociationProvider interface
154                        virtual void associators(
155                            const OperationContext & context,
156                            const CIMObjectPath & objectName,
157                            const CIMName & associationClass,
158                            const CIMName & resultClass,
159                            const String & role,
160                            const String & resultRole,
161                            const Boolean includeQualifiers,
162                            const Boolean includeClassOrigin,
163                            const CIMPropertyList & propertyList,
164                            ObjectResponseHandler & handler);
165                    
166                        virtual void associatorNames(
167                            const OperationContext & context,
168                            const CIMObjectPath & objectName,
169 a.dunfey 1.22              const CIMName & associationClass,
170                            const CIMName & resultClass,
171                            const String & role,
172                            const String & resultRole,
173                            ObjectPathResponseHandler & handler);
174                    
175                        virtual void references(
176                            const OperationContext & context,
177                            const CIMObjectPath & objectName,
178                            const CIMName & resultClass,
179                            const String & role,
180                            const Boolean includeQualifiers,
181                            const Boolean includeClassOrigin,
182                            const CIMPropertyList & propertyList,
183                            ObjectResponseHandler & handler);
184                    
185                        virtual void referenceNames(
186                            const OperationContext & context,
187                            const CIMObjectPath & objectName,
188                            const CIMName & resultClass,
189                            const String & role,
190 karl     1.1               ObjectPathResponseHandler & handler);
191                    
192                    private:
193                    
194 a.dunfey 1.23          void initProvider();
195                    
196 a.dunfey 1.22          CIMInstance buildInstanceSkeleton(
197                            const CIMNamespaceName & nameSpace,
198 karl     1.13              const CIMName& className,
199                            CIMClass& returnedClass);
200 karl     1.12      
201 a.dunfey 1.22          CIMInstance buildCIMXMLCommunicationMechanismInstance(
202 tony     1.4               const String& namespaceType,
203 karl     1.14              const Uint16& accessProtocol,
204 a.dunfey 1.22              const String& IPAddress,
205                            const CIMClass & commMechClass);
206                    
207                        Array<CIMInstance> enumCIMXMLCommunicationMechanismInstances();
208                    
209                        Array<CIMInstance> enumHostedAccessPointInstances();
210 tony     1.4       
211 a.dunfey 1.22          CIMInstance getObjectManagerInstance();
212 tony     1.4       
213 a.dunfey 1.22          CIMInstance getComputerSystemInstance();
214                    
215                        CIMInstance getHostedObjectManagerInstance();
216                    
217                        Array<CIMInstance> enumNamespaceInstances();
218 tony     1.4       
219 a.dunfey 1.22          CIMInstance buildNamespaceInstance(const String & nameSpace);
220 karl     1.18      
221 a.dunfey 1.22          CIMObjectPath createNamespace(const CIMInstance & namespaceInstance);
222                        void deleteNamespace(const CIMObjectPath & instanceName);
223 tony     1.4       
224 a.dunfey 1.22          Array<CIMInstance> enumNamespaceInManagerInstances();
225 karl     1.6       
226 a.dunfey 1.22          Array<CIMInstance> enumCommMechanismForManagerInstances();
227 karl     1.19      
228 karl     1.6           void modifyObjectManagerInstance(const OperationContext & context,
229                            const CIMObjectPath & instanceReference,
230                            const CIMInstance& modifiedIns,
231                            const Boolean includeQualifiers,
232 karl     1.19              const CIMPropertyList& propertyList);
233 karl     1.6       
234 a.dunfey 1.22          void extractSoftwareIdentityInfo(
235                            const CIMInstance & providerInstance,
236                            String & moduleName,
237                            String & providerName,
238                            String & version,
239                            String & vendor,
240                            Uint16 & majorVersion,
241                            Uint16 & minorVersion,
242                            Uint16 & revision,
243                            Uint16 & build,
244                            bool & extendedVersionSupplied,
245                            String & interfaceType,
246                            String & elementName,
247                            String & caption);
248                    
249                        Array<CIMInstance> enumRegisteredProfileInstances();
250                        Array<CIMInstance> enumRegisteredSubProfileInstances();
251                        Array<CIMInstance> enumReferencedProfileInstances();
252                        Array<CIMInstance> enumElementConformsToProfileInstances(
253                            const OperationContext & opContext,
254                            const CIMNamespaceName & opNamespace);
255 a.dunfey 1.22          Array<CIMInstance> enumSubProfileRequiresProfileInstances();
256                        Array<CIMInstance> enumSoftwareIdentityInstances();
257                        Array<CIMInstance> enumElementSoftwareIdentityInstances();
258                        Array<CIMInstance> enumInstalledSoftwareIdentityInstances();
259                    
260                        CIMInstance buildRegisteredProfile(
261                            const String & instanceId,
262                            const String & profileName,
263                            const String & profileVersion,
264                            Uint16 profileOrganization,
265                            const String & otherProfileOrganization,
266                            const CIMClass & profileClass);
267                    
268                        CIMInstance buildDependencyInstance(
269                            const String & antecedentId,
270                            const CIMName & antecedentClass,
271                            const String & dependentId,
272                            const CIMName & dependentClass,
273                            const CIMClass & dependencyClass);
274                    
275                        CIMInstance buildSoftwareIdentity(
276 a.dunfey 1.22              const String & module,
277                            const String & provider,
278                            const String & vendor,
279                            const String & version,
280                            Uint16 majorVersion,
281                            Uint16 minorVersion,
282                            Uint16 revisionNumber,
283                            Uint16 buildNumber,
284                            bool extendedVersionSupplied,
285                            const String & interfaceType,
286                            const String & elementName,
287                            const String & caption);
288                    
289                        Array<CIMInstance> getProfileInstances(
290                            const CIMName & profileType,
291                            const Array<String> & defaultSniaProfiles);
292                    
293 karl     1.15          // The following are internal equivalents of the operations
294                        // allowing the operations to call one another internally within
295                        // the provider.
296 karl     1.16          Array<CIMInstance> localEnumerateInstances(
297 karl     1.15              const OperationContext & context,
298                            const CIMObjectPath & ref,
299 a.dunfey 1.22              const CIMPropertyList& propertyList=CIMPropertyList());
300 karl     1.15      
301 a.dunfey 1.22          Array<CIMInstance> localReferences(
302                            const OperationContext & context,
303                            const CIMObjectPath & objectName,
304                            const CIMName & resultClass,
305                            String & originRole,
306                            String & targetRole,
307                            const CIMPropertyList & propertyList=CIMPropertyList(),
308                            const CIMName & targetClass=CIMName());
309 karl     1.15      
310 karl     1.17          CIMInstance localGetInstance(
311 karl     1.15              const OperationContext & context,
312                            const CIMObjectPath & instanceName,
313                            const CIMPropertyList & propertyList);
314 karl     1.18      
315 a.dunfey 1.22          void cacheProfileRegistrationInfo();
316                        void verifyCachedInfo();
317                    
318                        bool validAssocClassForObject(
319                            const CIMName & assocClass, const CIMName & originClass,
320                            const CIMNamespaceName & opNamespace,
321                            String & originProperty, String & targetProperty);
322                    
323                        // Repository Instance variable
324                        CIMOMHandle cimomHandle;
325                        CIMRepository * repository;
326                        String objectManagerName;
327                        String hostName;
328                        CIMClass profileCapabilitiesClass;
329                        CIMClass softwareIdentityClass;
330                        Array<Uint16> providerClassifications;
331                        Mutex interopMut;
332 a.dunfey 1.23          bool providerInitialized;
333 a.dunfey 1.22      
334                        // Registration info to cache
335                        Array<String> profileIds;
336                        Array<CIMNameArray> conformingElements;
337                        Array<CIMNamespaceArray> elementNamespaces;
338 karl     1.1       };
339                    
340 a.dunfey 1.23      PEGASUS_NAMESPACE_END
341 karl     1.1       
342                    #endif // InteropProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2