You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(5) |
Feb
(16) |
Mar
(5) |
Apr
(5) |
May
(13) |
Jun
(12) |
Jul
(1) |
Aug
(2) |
Sep
(13) |
Oct
(6) |
Nov
(1) |
Dec
(29) |
2008 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(57) |
May
(35) |
Jun
(45) |
Jul
(132) |
Aug
(87) |
Sep
(141) |
Oct
(86) |
Nov
(17) |
Dec
(2) |
2009 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <mik...@us...> - 2008-07-04 18:40:23
|
Revision: 707 http://omc.svn.sourceforge.net/omc/?rev=707&view=rev Author: mike-brasher Date: 2008-07-04 11:40:32 -0700 (Fri, 04 Jul 2008) Log Message: ----------- First cut. Added Paths: ----------- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/install.sh cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/konkret.sh cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ssh-service-profile.kon Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/install.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/install.sh (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/install.sh 2008-07-04 18:40:32 UTC (rev 707) @@ -0,0 +1,3 @@ +#!/bin/sh +TARGET=liblinux_sshserviceprovider.so +cp .libs/$TARGET.1.0.0 /usr/lib64/$TARGET Property changes on: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/install.sh ___________________________________________________________________ Name: svn:executable + * Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/konkret.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/konkret.sh (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/konkret.sh 2008-07-04 18:40:32 UTC (rev 707) @@ -0,0 +1,3 @@ +#!/bin/sh +BASE=/usr/share/sblim-cmpi-base/Linux_Base.mof +konkret -m $BASE -m ../mof/linux-ssh-service-profile.mof -f ssh-service-profile.kon Property changes on: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/konkret.sh ___________________________________________________________________ Name: svn:executable + * Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ssh-service-profile.kon =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ssh-service-profile.kon (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ssh-service-profile.kon 2008-07-04 18:40:32 UTC (rev 707) @@ -0,0 +1,3 @@ +Linux_SSHProtocolService=SSHProtocolService! +Linux_SSHCapabilities=SSHCapabilities! +Linux_SSHElementCapabilities=SSHElementCapabilities! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-04 18:39:52
|
Revision: 706 http://omc.svn.sourceforge.net/omc/?rev=706&view=rev Author: mike-brasher Date: 2008-07-04 11:40:01 -0700 (Fri, 04 Jul 2008) Log Message: ----------- First cut. Added Paths: ----------- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/CIM_ConcreteJob.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/CIM_IPProtocolEndpoint.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/CIM_ManagedElement.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/CIM_TCPProtocolEndpoint.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ProtocolServiceProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilities.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilities.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHProtocolService.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHProtocolServiceProvider.c Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/CIM_ConcreteJob.h =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/CIM_ConcreteJob.h (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/CIM_ConcreteJob.h 2008-07-04 18:40:01 UTC (rev 706) @@ -0,0 +1,2840 @@ +/* +**============================================================================== +** +** CAUTION: This file generated by KonkretCMPI. Please do not edit. +** +**============================================================================== +*/ + +#ifndef _konkrete_CIM_ConcreteJob_h +#define _konkrete_CIM_ConcreteJob_h + +#include <konkret/konkret.h> + +/* +**============================================================================== +** +** struct CIM_ConcreteJobRef +** +**============================================================================== +*/ + +/* classname=CIM_ConcreteJob */ +typedef struct _CIM_ConcreteJobRef +{ + KBase __base; + /* CIM_ManagedElement features */ + /* CIM_ManagedSystemElement features */ + /* CIM_LogicalElement features */ + /* CIM_Job features */ + /* CIM_ConcreteJob features */ + const KString InstanceID; +} +CIM_ConcreteJobRef; + +static const unsigned char __CIM_ConcreteJobRef_sig[] = +{ + 0x0f,0x43,0x49,0x4d,0x5f,0x43,0x6f,0x6e,0x63,0x72,0x65,0x74,0x65,0x4a,0x6f, + 0x62,0x00,0x01,0x4c,0x0a,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44, + 0x00, +}; + +KINLINE void CIM_ConcreteJobRef_Init( + CIM_ConcreteJobRef* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __CIM_ConcreteJobRef_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); +} + +KINLINE CMPIStatus CIM_ConcreteJobRef_InitFromInstance( + CIM_ConcreteJobRef* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + CIM_ConcreteJobRef_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus CIM_ConcreteJobRef_InitFromObjectPath( + CIM_ConcreteJobRef* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + CIM_ConcreteJobRef_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void CIM_ConcreteJobRef_Print( + const CIM_ConcreteJobRef* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'r'); +} + +KINLINE CMPIInstance* CIM_ConcreteJobRef_ToInstance( + const CIM_ConcreteJobRef* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* CIM_ConcreteJobRef_ToObjectPath( + const CIM_ConcreteJobRef* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* CIM_ConcreteJobRef_NameSpace( + CIM_ConcreteJobRef* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void CIM_ConcreteJobRef_SetString_InstanceID( + CIM_ConcreteJobRef* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->InstanceID; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJobRef_Set_InstanceID( + CIM_ConcreteJobRef* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->InstanceID; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJobRef_Null_InstanceID( + CIM_ConcreteJobRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->InstanceID; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJobRef_Clr_InstanceID( + CIM_ConcreteJobRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->InstanceID; + KString_Clr(field); + } +} + +/* +**============================================================================== +** +** struct CIM_ConcreteJob +** +**============================================================================== +*/ + +/* classname=CIM_ConcreteJob */ +typedef struct _CIM_ConcreteJob +{ + KBase __base; + /* CIM_ManagedElement features */ + const KString Caption; + const KString Description; + const KString ElementName; + /* CIM_ManagedSystemElement features */ + const KDateTime InstallDate; + const KString Name; + const KUint16A OperationalStatus; + const KStringA StatusDescriptions; + const KString Status; + const KUint16 HealthState; + const KUint16 PrimaryStatus; + const KUint16 DetailedStatus; + const KUint16 OperatingStatus; + const KUint16 CommunicationStatus; + /* CIM_LogicalElement features */ + /* CIM_Job features */ + const KString JobStatus; + const KDateTime TimeSubmitted; + const KDateTime ScheduledStartTime; + const KDateTime StartTime; + const KDateTime ElapsedTime; + const KUint32 JobRunTimes; + const KUint8 RunMonth; + const KSint8 RunDay; + const KSint8 RunDayOfWeek; + const KDateTime RunStartInterval; + const KUint16 LocalOrUtcTime; + const KDateTime UntilTime; + const KString Notify; + const KString Owner; + const KUint32 Priority; + const KUint16 PercentComplete; + const KBoolean DeleteOnCompletion; + const KUint16 ErrorCode; + const KString ErrorDescription; + const KUint16 RecoveryAction; + const KString OtherRecoveryAction; + /* CIM_ConcreteJob features */ + const KString InstanceID; + const KUint16 JobState; + const KDateTime TimeOfLastStateChange; + const KDateTime TimeBeforeRemoval; +} +CIM_ConcreteJob; + +static const unsigned char __CIM_ConcreteJob_sig[] = +{ + 0x0f,0x43,0x49,0x4d,0x5f,0x43,0x6f,0x6e,0x63,0x72,0x65,0x74,0x65,0x4a,0x6f, + 0x62,0x00,0x26,0x0c,0x07,0x43,0x61,0x70,0x74,0x69,0x6f,0x6e,0x00,0x0c,0x0b, + 0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x00,0x0c,0x0b,0x45, + 0x6c,0x65,0x6d,0x65,0x6e,0x74,0x4e,0x61,0x6d,0x65,0x00,0x0d,0x0b,0x49,0x6e, + 0x73,0x74,0x61,0x6c,0x6c,0x44,0x61,0x74,0x65,0x00,0x0c,0x04,0x4e,0x61,0x6d, + 0x65,0x00,0x83,0x11,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e,0x61,0x6c, + 0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x8c,0x12,0x53,0x74,0x61,0x74,0x75,0x73, + 0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x73,0x00,0x0c,0x06, + 0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x0b,0x48,0x65,0x61,0x6c,0x74,0x68, + 0x53,0x74,0x61,0x74,0x65,0x00,0x03,0x0d,0x50,0x72,0x69,0x6d,0x61,0x72,0x79, + 0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x0e,0x44,0x65,0x74,0x61,0x69,0x6c, + 0x65,0x64,0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x0f,0x4f,0x70,0x65,0x72, + 0x61,0x74,0x69,0x6e,0x67,0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x13,0x43, + 0x6f,0x6d,0x6d,0x75,0x6e,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x53,0x74,0x61, + 0x74,0x75,0x73,0x00,0x0c,0x09,0x4a,0x6f,0x62,0x53,0x74,0x61,0x74,0x75,0x73, + 0x00,0x0d,0x0d,0x54,0x69,0x6d,0x65,0x53,0x75,0x62,0x6d,0x69,0x74,0x74,0x65, + 0x64,0x00,0x0d,0x12,0x53,0x63,0x68,0x65,0x64,0x75,0x6c,0x65,0x64,0x53,0x74, + 0x61,0x72,0x74,0x54,0x69,0x6d,0x65,0x00,0x0d,0x09,0x53,0x74,0x61,0x72,0x74, + 0x54,0x69,0x6d,0x65,0x00,0x0d,0x0b,0x45,0x6c,0x61,0x70,0x73,0x65,0x64,0x54, + 0x69,0x6d,0x65,0x00,0x05,0x0b,0x4a,0x6f,0x62,0x52,0x75,0x6e,0x54,0x69,0x6d, + 0x65,0x73,0x00,0x01,0x08,0x52,0x75,0x6e,0x4d,0x6f,0x6e,0x74,0x68,0x00,0x02, + 0x06,0x52,0x75,0x6e,0x44,0x61,0x79,0x00,0x02,0x0c,0x52,0x75,0x6e,0x44,0x61, + 0x79,0x4f,0x66,0x57,0x65,0x65,0x6b,0x00,0x0d,0x10,0x52,0x75,0x6e,0x53,0x74, + 0x61,0x72,0x74,0x49,0x6e,0x74,0x65,0x72,0x76,0x61,0x6c,0x00,0x03,0x0e,0x4c, + 0x6f,0x63,0x61,0x6c,0x4f,0x72,0x55,0x74,0x63,0x54,0x69,0x6d,0x65,0x00,0x0d, + 0x09,0x55,0x6e,0x74,0x69,0x6c,0x54,0x69,0x6d,0x65,0x00,0x0c,0x06,0x4e,0x6f, + 0x74,0x69,0x66,0x79,0x00,0x0c,0x05,0x4f,0x77,0x6e,0x65,0x72,0x00,0x05,0x08, + 0x50,0x72,0x69,0x6f,0x72,0x69,0x74,0x79,0x00,0x03,0x0f,0x50,0x65,0x72,0x63, + 0x65,0x6e,0x74,0x43,0x6f,0x6d,0x70,0x6c,0x65,0x74,0x65,0x00,0x00,0x12,0x44, + 0x65,0x6c,0x65,0x74,0x65,0x4f,0x6e,0x43,0x6f,0x6d,0x70,0x6c,0x65,0x74,0x69, + 0x6f,0x6e,0x00,0x03,0x09,0x45,0x72,0x72,0x6f,0x72,0x43,0x6f,0x64,0x65,0x00, + 0x0c,0x10,0x45,0x72,0x72,0x6f,0x72,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74, + 0x69,0x6f,0x6e,0x00,0x03,0x0e,0x52,0x65,0x63,0x6f,0x76,0x65,0x72,0x79,0x41, + 0x63,0x74,0x69,0x6f,0x6e,0x00,0x0c,0x13,0x4f,0x74,0x68,0x65,0x72,0x52,0x65, + 0x63,0x6f,0x76,0x65,0x72,0x79,0x41,0x63,0x74,0x69,0x6f,0x6e,0x00,0x4c,0x0a, + 0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x00,0x03,0x08,0x4a,0x6f, + 0x62,0x53,0x74,0x61,0x74,0x65,0x00,0x0d,0x15,0x54,0x69,0x6d,0x65,0x4f,0x66, + 0x4c,0x61,0x73,0x74,0x53,0x74,0x61,0x74,0x65,0x43,0x68,0x61,0x6e,0x67,0x65, + 0x00,0x0d,0x11,0x54,0x69,0x6d,0x65,0x42,0x65,0x66,0x6f,0x72,0x65,0x52,0x65, + 0x6d,0x6f,0x76,0x61,0x6c,0x00, +}; + +KINLINE void CIM_ConcreteJob_Init( + CIM_ConcreteJob* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __CIM_ConcreteJob_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); +} + +KINLINE CMPIStatus CIM_ConcreteJob_InitFromInstance( + CIM_ConcreteJob* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + CIM_ConcreteJob_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus CIM_ConcreteJob_InitFromObjectPath( + CIM_ConcreteJob* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + CIM_ConcreteJob_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void CIM_ConcreteJob_Print( + const CIM_ConcreteJob* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'i'); +} + +KINLINE CMPIInstance* CIM_ConcreteJob_ToInstance( + const CIM_ConcreteJob* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* CIM_ConcreteJob_ToObjectPath( + const CIM_ConcreteJob* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* CIM_ConcreteJob_NameSpace( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void CIM_ConcreteJob_SetString_Caption( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_Caption( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_Caption( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_Caption( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_SetString_Description( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_Description( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_Description( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_Description( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_SetString_ElementName( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_ElementName( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_ElementName( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_ElementName( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_InstallDate( + CIM_ConcreteJob* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->InstallDate; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_InstallDate( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->InstallDate; + KDateTime_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_InstallDate( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->InstallDate; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_SetString_Name( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_Name( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_Name( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_Name( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_Clr(field); + } +} + +KINLINE CMPIBoolean CIM_ConcreteJob_Init_OperationalStatus( + CIM_ConcreteJob* self, + CMPICount count) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Init(field, self->__base.cb, count); + } + return 0; +} + +KINLINE void CIM_ConcreteJob_InitNull_OperationalStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + KUint16A_InitNull(field); + } +} + +KINLINE CMPIBoolean CIM_ConcreteJob_Set_OperationalStatus( + CIM_ConcreteJob* self, + CMPICount i, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Set(field, i, x); + } + return 0; +} + +KINLINE KUint16 CIM_ConcreteJob_Get_OperationalStatus( + CIM_ConcreteJob* self, + CMPICount i) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Get(field, i); + } + return KUint16A_Get(NULL, 0); +} + +KINLINE CMPIBoolean CIM_ConcreteJob_Null_OperationalStatus( + CIM_ConcreteJob* self, + CMPICount i) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Null(field, i); + } + return 0; +} + +KINLINE void CIM_ConcreteJob_Clr_OperationalStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + KUint16A_Clr(field); + } +} + +/* "Unknown" */ +#define CIM_ConcreteJob_OperationalStatus_Unknown 0 + +/* "Other" */ +#define CIM_ConcreteJob_OperationalStatus_Other 1 + +/* "OK" */ +#define CIM_ConcreteJob_OperationalStatus_OK 2 + +/* "Degraded" */ +#define CIM_ConcreteJob_OperationalStatus_Degraded 3 + +/* "Stressed" */ +#define CIM_ConcreteJob_OperationalStatus_Stressed 4 + +/* "Predictive Failure" */ +#define CIM_ConcreteJob_OperationalStatus_Predictive_Failure 5 + +/* "Error" */ +#define CIM_ConcreteJob_OperationalStatus_Error 6 + +/* "Non-Recoverable Error" */ +#define CIM_ConcreteJob_OperationalStatus_Non_Recoverable_Error 7 + +/* "Starting" */ +#define CIM_ConcreteJob_OperationalStatus_Starting 8 + +/* "Stopping" */ +#define CIM_ConcreteJob_OperationalStatus_Stopping 9 + +/* "Stopped" */ +#define CIM_ConcreteJob_OperationalStatus_Stopped 10 + +/* "In Service" */ +#define CIM_ConcreteJob_OperationalStatus_In_Service 11 + +/* "No Contact" */ +#define CIM_ConcreteJob_OperationalStatus_No_Contact 12 + +/* "Lost Communication" */ +#define CIM_ConcreteJob_OperationalStatus_Lost_Communication 13 + +/* "Aborted" */ +#define CIM_ConcreteJob_OperationalStatus_Aborted 14 + +/* "Dormant" */ +#define CIM_ConcreteJob_OperationalStatus_Dormant 15 + +/* "Supporting Entity in Error" */ +#define CIM_ConcreteJob_OperationalStatus_Supporting_Entity_in_Error 16 + +/* "Completed" */ +#define CIM_ConcreteJob_OperationalStatus_Completed 17 + +/* "Power Mode" */ +#define CIM_ConcreteJob_OperationalStatus_Power_Mode 18 + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_OperationalStatus_DMTF_Reserved 0 + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_OperationalStatus_Vendor_Reserved 0 + +/* "Unknown" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Unknown(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 0) + +/* "Other" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Other(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 1) + +/* "OK" */ +#define CIM_ConcreteJob_Set_OperationalStatus_OK(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 2) + +/* "Degraded" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Degraded(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 3) + +/* "Stressed" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Stressed(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 4) + +/* "Predictive Failure" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Predictive_Failure(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 5) + +/* "Error" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Error(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 6) + +/* "Non-Recoverable Error" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Non_Recoverable_Error(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 7) + +/* "Starting" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Starting(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 8) + +/* "Stopping" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Stopping(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 9) + +/* "Stopped" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Stopped(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 10) + +/* "In Service" */ +#define CIM_ConcreteJob_Set_OperationalStatus_In_Service(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 11) + +/* "No Contact" */ +#define CIM_ConcreteJob_Set_OperationalStatus_No_Contact(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 12) + +/* "Lost Communication" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Lost_Communication(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 13) + +/* "Aborted" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Aborted(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 14) + +/* "Dormant" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Dormant(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 15) + +/* "Supporting Entity in Error" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Supporting_Entity_in_Error(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 16) + +/* "Completed" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Completed(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 17) + +/* "Power Mode" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Power_Mode(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 18) + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_Set_OperationalStatus_DMTF_Reserved(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 0) + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_Set_OperationalStatus_Vendor_Reserved(SELF, INDEX)\ + CIM_ConcreteJob_Set_OperationalStatus(SELF, INDEX, 0) + +KINLINE CMPIBoolean CIM_ConcreteJob_Init_StatusDescriptions( + CIM_ConcreteJob* self, + CMPICount count) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + return KStringA_Init(field, self->__base.cb, count); + } + return 0; +} + +KINLINE void CIM_ConcreteJob_InitNull_StatusDescriptions( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + KStringA_InitNull(field); + } +} + +KINLINE CMPIBoolean CIM_ConcreteJob_SetString_StatusDescriptions( + CIM_ConcreteJob* self, + CMPICount i, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + return KStringA_SetString(field, i, x); + } + return 0; +} + +KINLINE CMPIBoolean CIM_ConcreteJob_Set_StatusDescriptions( + CIM_ConcreteJob* self, + CMPICount i, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + return KStringA_Set(field, self->__base.cb, i, s); + } + return 0; +} + +KINLINE KString CIM_ConcreteJob_GetString_StatusDescriptions( + CIM_ConcreteJob* self, + CMPICount i) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + return KStringA_GetString(field, i); + } + return KStringA_GetString(NULL, 0); +} + +KINLINE const char* CIM_ConcreteJob_Get_StatusDescriptions( + CIM_ConcreteJob* self, + CMPICount i) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + return KStringA_Get(field, i); + } + return NULL; +} + +KINLINE CMPIBoolean CIM_ConcreteJob_Null_StatusDescriptions( + CIM_ConcreteJob* self, + CMPICount i) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + return KStringA_Null(field, i); + } + return 0; +} + +KINLINE void CIM_ConcreteJob_Clr_StatusDescriptions( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KStringA* field = (KStringA*)&self->StatusDescriptions; + KStringA_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_SetString_Status( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Status; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_Status( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Status; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_Status( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Status; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_Status( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Status; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_HealthState( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->HealthState; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_HealthState( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->HealthState; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_HealthState( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->HealthState; + KUint16_Clr(field); + } +} + +/* "Unknown" */ +#define CIM_ConcreteJob_HealthState_Unknown 0 + +/* "OK" */ +#define CIM_ConcreteJob_HealthState_OK 5 + +/* "Degraded/Warning" */ +#define CIM_ConcreteJob_HealthState_Degraded_Warning 10 + +/* "Minor failure" */ +#define CIM_ConcreteJob_HealthState_Minor_failure 15 + +/* "Major failure" */ +#define CIM_ConcreteJob_HealthState_Major_failure 20 + +/* "Critical failure" */ +#define CIM_ConcreteJob_HealthState_Critical_failure 25 + +/* "Non-recoverable error" */ +#define CIM_ConcreteJob_HealthState_Non_recoverable_error 30 + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_HealthState_DMTF_Reserved 0 + +/* "Unknown" */ +#define CIM_ConcreteJob_Set_HealthState_Unknown(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 0) + +/* "OK" */ +#define CIM_ConcreteJob_Set_HealthState_OK(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 5) + +/* "Degraded/Warning" */ +#define CIM_ConcreteJob_Set_HealthState_Degraded_Warning(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 10) + +/* "Minor failure" */ +#define CIM_ConcreteJob_Set_HealthState_Minor_failure(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 15) + +/* "Major failure" */ +#define CIM_ConcreteJob_Set_HealthState_Major_failure(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 20) + +/* "Critical failure" */ +#define CIM_ConcreteJob_Set_HealthState_Critical_failure(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 25) + +/* "Non-recoverable error" */ +#define CIM_ConcreteJob_Set_HealthState_Non_recoverable_error(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 30) + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_Set_HealthState_DMTF_Reserved(SELF) \ + CIM_ConcreteJob_Set_HealthState(SELF, 0) + +KINLINE void CIM_ConcreteJob_Set_PrimaryStatus( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->PrimaryStatus; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_PrimaryStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->PrimaryStatus; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_PrimaryStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->PrimaryStatus; + KUint16_Clr(field); + } +} + +/* "Unknown" */ +#define CIM_ConcreteJob_PrimaryStatus_Unknown 0 + +/* "OK" */ +#define CIM_ConcreteJob_PrimaryStatus_OK 1 + +/* "Degraded" */ +#define CIM_ConcreteJob_PrimaryStatus_Degraded 2 + +/* "Error" */ +#define CIM_ConcreteJob_PrimaryStatus_Error 3 + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_PrimaryStatus_DMTF_Reserved 0 + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_PrimaryStatus_Vendor_Reserved 0 + +/* "Unknown" */ +#define CIM_ConcreteJob_Set_PrimaryStatus_Unknown(SELF) \ + CIM_ConcreteJob_Set_PrimaryStatus(SELF, 0) + +/* "OK" */ +#define CIM_ConcreteJob_Set_PrimaryStatus_OK(SELF) \ + CIM_ConcreteJob_Set_PrimaryStatus(SELF, 1) + +/* "Degraded" */ +#define CIM_ConcreteJob_Set_PrimaryStatus_Degraded(SELF) \ + CIM_ConcreteJob_Set_PrimaryStatus(SELF, 2) + +/* "Error" */ +#define CIM_ConcreteJob_Set_PrimaryStatus_Error(SELF) \ + CIM_ConcreteJob_Set_PrimaryStatus(SELF, 3) + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_Set_PrimaryStatus_DMTF_Reserved(SELF) \ + CIM_ConcreteJob_Set_PrimaryStatus(SELF, 0) + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_Set_PrimaryStatus_Vendor_Reserved(SELF) \ + CIM_ConcreteJob_Set_PrimaryStatus(SELF, 0) + +KINLINE void CIM_ConcreteJob_Set_DetailedStatus( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->DetailedStatus; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_DetailedStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->DetailedStatus; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_DetailedStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->DetailedStatus; + KUint16_Clr(field); + } +} + +/* "Not Available" */ +#define CIM_ConcreteJob_DetailedStatus_Not_Available 0 + +/* "No Additional Information" */ +#define CIM_ConcreteJob_DetailedStatus_No_Additional_Information 1 + +/* "Stressed" */ +#define CIM_ConcreteJob_DetailedStatus_Stressed 2 + +/* "Predictive Failure" */ +#define CIM_ConcreteJob_DetailedStatus_Predictive_Failure 3 + +/* "Non-Recoverable Error" */ +#define CIM_ConcreteJob_DetailedStatus_Non_Recoverable_Error 4 + +/* "Supporting Entity in Error" */ +#define CIM_ConcreteJob_DetailedStatus_Supporting_Entity_in_Error 5 + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_DetailedStatus_DMTF_Reserved 0 + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_DetailedStatus_Vendor_Reserved 0 + +/* "Not Available" */ +#define CIM_ConcreteJob_Set_DetailedStatus_Not_Available(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 0) + +/* "No Additional Information" */ +#define CIM_ConcreteJob_Set_DetailedStatus_No_Additional_Information(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 1) + +/* "Stressed" */ +#define CIM_ConcreteJob_Set_DetailedStatus_Stressed(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 2) + +/* "Predictive Failure" */ +#define CIM_ConcreteJob_Set_DetailedStatus_Predictive_Failure(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 3) + +/* "Non-Recoverable Error" */ +#define CIM_ConcreteJob_Set_DetailedStatus_Non_Recoverable_Error(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 4) + +/* "Supporting Entity in Error" */ +#define CIM_ConcreteJob_Set_DetailedStatus_Supporting_Entity_in_Error(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 5) + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_Set_DetailedStatus_DMTF_Reserved(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 0) + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_Set_DetailedStatus_Vendor_Reserved(SELF) \ + CIM_ConcreteJob_Set_DetailedStatus(SELF, 0) + +KINLINE void CIM_ConcreteJob_Set_OperatingStatus( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->OperatingStatus; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_OperatingStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->OperatingStatus; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_OperatingStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->OperatingStatus; + KUint16_Clr(field); + } +} + +/* "Unknown" */ +#define CIM_ConcreteJob_OperatingStatus_Unknown 0 + +/* "Not Available" */ +#define CIM_ConcreteJob_OperatingStatus_Not_Available 1 + +/* "Servicing" */ +#define CIM_ConcreteJob_OperatingStatus_Servicing 2 + +/* "Starting" */ +#define CIM_ConcreteJob_OperatingStatus_Starting 3 + +/* "Stopping" */ +#define CIM_ConcreteJob_OperatingStatus_Stopping 4 + +/* "Stopped" */ +#define CIM_ConcreteJob_OperatingStatus_Stopped 5 + +/* "Aborted" */ +#define CIM_ConcreteJob_OperatingStatus_Aborted 6 + +/* "Dormant" */ +#define CIM_ConcreteJob_OperatingStatus_Dormant 7 + +/* "Completed" */ +#define CIM_ConcreteJob_OperatingStatus_Completed 8 + +/* "Migrating" */ +#define CIM_ConcreteJob_OperatingStatus_Migrating 9 + +/* "Emigrating" */ +#define CIM_ConcreteJob_OperatingStatus_Emigrating 10 + +/* "Immigrating" */ +#define CIM_ConcreteJob_OperatingStatus_Immigrating 11 + +/* "Snapshotting" */ +#define CIM_ConcreteJob_OperatingStatus_Snapshotting 12 + +/* "Shutting Down" */ +#define CIM_ConcreteJob_OperatingStatus_Shutting_Down 13 + +/* "In Test" */ +#define CIM_ConcreteJob_OperatingStatus_In_Test 14 + +/* "Transitioning" */ +#define CIM_ConcreteJob_OperatingStatus_Transitioning 15 + +/* "In Service" */ +#define CIM_ConcreteJob_OperatingStatus_In_Service 16 + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_OperatingStatus_DMTF_Reserved 0 + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_OperatingStatus_Vendor_Reserved 0 + +/* "Unknown" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Unknown(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 0) + +/* "Not Available" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Not_Available(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 1) + +/* "Servicing" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Servicing(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 2) + +/* "Starting" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Starting(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 3) + +/* "Stopping" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Stopping(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 4) + +/* "Stopped" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Stopped(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 5) + +/* "Aborted" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Aborted(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 6) + +/* "Dormant" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Dormant(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 7) + +/* "Completed" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Completed(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 8) + +/* "Migrating" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Migrating(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 9) + +/* "Emigrating" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Emigrating(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 10) + +/* "Immigrating" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Immigrating(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 11) + +/* "Snapshotting" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Snapshotting(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 12) + +/* "Shutting Down" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Shutting_Down(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 13) + +/* "In Test" */ +#define CIM_ConcreteJob_Set_OperatingStatus_In_Test(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 14) + +/* "Transitioning" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Transitioning(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 15) + +/* "In Service" */ +#define CIM_ConcreteJob_Set_OperatingStatus_In_Service(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 16) + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_Set_OperatingStatus_DMTF_Reserved(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 0) + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_Set_OperatingStatus_Vendor_Reserved(SELF) \ + CIM_ConcreteJob_Set_OperatingStatus(SELF, 0) + +KINLINE void CIM_ConcreteJob_Set_CommunicationStatus( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->CommunicationStatus; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_CommunicationStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->CommunicationStatus; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_CommunicationStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->CommunicationStatus; + KUint16_Clr(field); + } +} + +/* "Unknown" */ +#define CIM_ConcreteJob_CommunicationStatus_Unknown 0 + +/* "Not Available" */ +#define CIM_ConcreteJob_CommunicationStatus_Not_Available 1 + +/* "Communication OK" */ +#define CIM_ConcreteJob_CommunicationStatus_Communication_OK 2 + +/* "Lost Communication" */ +#define CIM_ConcreteJob_CommunicationStatus_Lost_Communication 3 + +/* "No Contact" */ +#define CIM_ConcreteJob_CommunicationStatus_No_Contact 4 + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_CommunicationStatus_DMTF_Reserved 0 + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_CommunicationStatus_Vendor_Reserved 0 + +/* "Unknown" */ +#define CIM_ConcreteJob_Set_CommunicationStatus_Unknown(SELF) \ + CIM_ConcreteJob_Set_CommunicationStatus(SELF, 0) + +/* "Not Available" */ +#define CIM_ConcreteJob_Set_CommunicationStatus_Not_Available(SELF) \ + CIM_ConcreteJob_Set_CommunicationStatus(SELF, 1) + +/* "Communication OK" */ +#define CIM_ConcreteJob_Set_CommunicationStatus_Communication_OK(SELF) \ + CIM_ConcreteJob_Set_CommunicationStatus(SELF, 2) + +/* "Lost Communication" */ +#define CIM_ConcreteJob_Set_CommunicationStatus_Lost_Communication(SELF) \ + CIM_ConcreteJob_Set_CommunicationStatus(SELF, 3) + +/* "No Contact" */ +#define CIM_ConcreteJob_Set_CommunicationStatus_No_Contact(SELF) \ + CIM_ConcreteJob_Set_CommunicationStatus(SELF, 4) + +/* "DMTF Reserved" */ +#define CIM_ConcreteJob_Set_CommunicationStatus_DMTF_Reserved(SELF) \ + CIM_ConcreteJob_Set_CommunicationStatus(SELF, 0) + +/* "Vendor Reserved" */ +#define CIM_ConcreteJob_Set_CommunicationStatus_Vendor_Reserved(SELF) \ + CIM_ConcreteJob_Set_CommunicationStatus(SELF, 0) + +KINLINE void CIM_ConcreteJob_SetString_JobStatus( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->JobStatus; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_JobStatus( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->JobStatus; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_JobStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->JobStatus; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_JobStatus( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->JobStatus; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_TimeSubmitted( + CIM_ConcreteJob* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->TimeSubmitted; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_TimeSubmitted( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->TimeSubmitted; + KDateTime_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_TimeSubmitted( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->TimeSubmitted; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_ScheduledStartTime( + CIM_ConcreteJob* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->ScheduledStartTime; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_ScheduledStartTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->ScheduledStartTime; + KDateTime_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_ScheduledStartTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->ScheduledStartTime; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_StartTime( + CIM_ConcreteJob* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->StartTime; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_StartTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->StartTime; + KDateTime_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_StartTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->StartTime; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_ElapsedTime( + CIM_ConcreteJob* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->ElapsedTime; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_ElapsedTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->ElapsedTime; + KDateTime_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_ElapsedTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->ElapsedTime; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_JobRunTimes( + CIM_ConcreteJob* self, + CMPIUint32 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint32* field = (KUint32*)&self->JobRunTimes; + KUint32_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_JobRunTimes( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint32* field = (KUint32*)&self->JobRunTimes; + KUint32_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_JobRunTimes( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint32* field = (KUint32*)&self->JobRunTimes; + KUint32_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_RunMonth( + CIM_ConcreteJob* self, + CMPIUint8 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint8* field = (KUint8*)&self->RunMonth; + KUint8_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_RunMonth( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint8* field = (KUint8*)&self->RunMonth; + KUint8_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_RunMonth( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint8* field = (KUint8*)&self->RunMonth; + KUint8_Clr(field); + } +} + +/* "January" */ +#define CIM_ConcreteJob_RunMonth_January 0 + +/* "February" */ +#define CIM_ConcreteJob_RunMonth_February 1 + +/* "March" */ +#define CIM_ConcreteJob_RunMonth_March 2 + +/* "April" */ +#define CIM_ConcreteJob_RunMonth_April 3 + +/* "May" */ +#define CIM_ConcreteJob_RunMonth_May 4 + +/* "June" */ +#define CIM_ConcreteJob_RunMonth_June 5 + +/* "July" */ +#define CIM_ConcreteJob_RunMonth_July 6 + +/* "August" */ +#define CIM_ConcreteJob_RunMonth_August 7 + +/* "September" */ +#define CIM_ConcreteJob_RunMonth_September 8 + +/* "October" */ +#define CIM_ConcreteJob_RunMonth_October 9 + +/* "November" */ +#define CIM_ConcreteJob_RunMonth_November 10 + +/* "December" */ +#define CIM_ConcreteJob_RunMonth_December 11 + +/* "January" */ +#define CIM_ConcreteJob_Set_RunMonth_January(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 0) + +/* "February" */ +#define CIM_ConcreteJob_Set_RunMonth_February(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 1) + +/* "March" */ +#define CIM_ConcreteJob_Set_RunMonth_March(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 2) + +/* "April" */ +#define CIM_ConcreteJob_Set_RunMonth_April(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 3) + +/* "May" */ +#define CIM_ConcreteJob_Set_RunMonth_May(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 4) + +/* "June" */ +#define CIM_ConcreteJob_Set_RunMonth_June(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 5) + +/* "July" */ +#define CIM_ConcreteJob_Set_RunMonth_July(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 6) + +/* "August" */ +#define CIM_ConcreteJob_Set_RunMonth_August(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 7) + +/* "September" */ +#define CIM_ConcreteJob_Set_RunMonth_September(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 8) + +/* "October" */ +#define CIM_ConcreteJob_Set_RunMonth_October(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 9) + +/* "November" */ +#define CIM_ConcreteJob_Set_RunMonth_November(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 10) + +/* "December" */ +#define CIM_ConcreteJob_Set_RunMonth_December(SELF) \ + CIM_ConcreteJob_Set_RunMonth(SELF, 11) + +KINLINE void CIM_ConcreteJob_Set_RunDay( + CIM_ConcreteJob* self, + CMPISint8 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KSint8* field = (KSint8*)&self->RunDay; + KSint8_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_RunDay( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KSint8* field = (KSint8*)&self->RunDay; + KSint8_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_RunDay( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KSint8* field = (KSint8*)&self->RunDay; + KSint8_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_RunDayOfWeek( + CIM_ConcreteJob* self, + CMPISint8 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KSint8* field = (KSint8*)&self->RunDayOfWeek; + KSint8_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_RunDayOfWeek( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KSint8* field = (KSint8*)&self->RunDayOfWeek; + KSint8_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_RunDayOfWeek( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KSint8* field = (KSint8*)&self->RunDayOfWeek; + KSint8_Clr(field); + } +} + +/* "-Saturday" */ +#define CIM_ConcreteJob_RunDayOfWeek__Saturday -7 + +/* "-Friday" */ +#define CIM_ConcreteJob_RunDayOfWeek__Friday -6 + +/* "-Thursday" */ +#define CIM_ConcreteJob_RunDayOfWeek__Thursday -5 + +/* "-Wednesday" */ +#define CIM_ConcreteJob_RunDayOfWeek__Wednesday -4 + +/* "-Tuesday" */ +#define CIM_ConcreteJob_RunDayOfWeek__Tuesday -3 + +/* "-Monday" */ +#define CIM_ConcreteJob_RunDayOfWeek__Monday -2 + +/* "-Sunday" */ +#define CIM_ConcreteJob_RunDayOfWeek__Sunday -1 + +/* "ExactDayOfMonth" */ +#define CIM_ConcreteJob_RunDayOfWeek_ExactDayOfMonth 0 + +/* "Sunday" */ +#define CIM_ConcreteJob_RunDayOfWeek_Sunday 1 + +/* "Monday" */ +#define CIM_ConcreteJob_RunDayOfWeek_Monday 2 + +/* "Tuesday" */ +#define CIM_ConcreteJob_RunDayOfWeek_Tuesday 3 + +/* "Wednesday" */ +#define CIM_ConcreteJob_RunDayOfWeek_Wednesday 4 + +/* "Thursday" */ +#define CIM_ConcreteJob_RunDayOfWeek_Thursday 5 + +/* "Friday" */ +#define CIM_ConcreteJob_RunDayOfWeek_Friday 6 + +/* "Saturday" */ +#define CIM_ConcreteJob_RunDayOfWeek_Saturday 7 + +/* "-Saturday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek__Saturday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, -7) + +/* "-Friday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek__Friday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, -6) + +/* "-Thursday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek__Thursday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, -5) + +/* "-Wednesday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek__Wednesday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, -4) + +/* "-Tuesday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek__Tuesday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, -3) + +/* "-Monday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek__Monday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, -2) + +/* "-Sunday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek__Sunday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, -1) + +/* "ExactDayOfMonth" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_ExactDayOfMonth(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 0) + +/* "Sunday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_Sunday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 1) + +/* "Monday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_Monday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 2) + +/* "Tuesday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_Tuesday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 3) + +/* "Wednesday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_Wednesday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 4) + +/* "Thursday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_Thursday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 5) + +/* "Friday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_Friday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 6) + +/* "Saturday" */ +#define CIM_ConcreteJob_Set_RunDayOfWeek_Saturday(SELF) \ + CIM_ConcreteJob_Set_RunDayOfWeek(SELF, 7) + +KINLINE void CIM_ConcreteJob_Set_RunStartInterval( + CIM_ConcreteJob* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->RunStartInterval; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_RunStartInterval( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->RunStartInterval; + KDateTime_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_RunStartInterval( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->RunStartInterval; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_LocalOrUtcTime( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->LocalOrUtcTime; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_LocalOrUtcTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->LocalOrUtcTime; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_LocalOrUtcTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->LocalOrUtcTime; + KUint16_Clr(field); + } +} + +/* "Local Time" */ +#define CIM_ConcreteJob_LocalOrUtcTime_Local_Time 1 + +/* "UTC Time" */ +#define CIM_ConcreteJob_LocalOrUtcTime_UTC_Time 2 + +/* "Local Time" */ +#define CIM_ConcreteJob_Set_LocalOrUtcTime_Local_Time(SELF) \ + CIM_ConcreteJob_Set_LocalOrUtcTime(SELF, 1) + +/* "UTC Time" */ +#define CIM_ConcreteJob_Set_LocalOrUtcTime_UTC_Time(SELF) \ + CIM_ConcreteJob_Set_LocalOrUtcTime(SELF, 2) + +KINLINE void CIM_ConcreteJob_Set_UntilTime( + CIM_ConcreteJob* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->UntilTime; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_UntilTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->UntilTime; + KDateTime_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_UntilTime( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->UntilTime; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_SetString_Notify( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Notify; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_Notify( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Notify; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_Notify( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Notify; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_Notify( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Notify; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_SetString_Owner( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Owner; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_Owner( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Owner; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_Owner( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Owner; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_Owner( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Owner; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_Priority( + CIM_ConcreteJob* self, + CMPIUint32 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint32* field = (KUint32*)&self->Priority; + KUint32_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_Priority( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint32* field = (KUint32*)&self->Priority; + KUint32_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_Priority( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint32* field = (KUint32*)&self->Priority; + KUint32_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_PercentComplete( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->PercentComplete; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_PercentComplete( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->PercentComplete; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_PercentComplete( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->PercentComplete; + KUint16_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_DeleteOnCompletion( + CIM_ConcreteJob* self, + CMPIBoolean x) +{ + if (self && self->__base.magic == KMAGIC) + { + KBoolean* field = (KBoolean*)&self->DeleteOnCompletion; + KBoolean_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_DeleteOnCompletion( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KBoolean* field = (KBoolean*)&self->DeleteOnCompletion; + KBoolean_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_DeleteOnCompletion( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KBoolean* field = (KBoolean*)&self->DeleteOnCompletion; + KBoolean_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_ErrorCode( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->ErrorCode; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_ErrorCode( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->ErrorCode; + KUint16_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_ErrorCode( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->ErrorCode; + KUint16_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_SetString_ErrorDescription( + CIM_ConcreteJob* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ErrorDescription; + KString_SetString(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Set_ErrorDescription( + CIM_ConcreteJob* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ErrorDescription; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_ConcreteJob_Null_ErrorDescription( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ErrorDescription; + KString_Null(field); + } +} + +KINLINE void CIM_ConcreteJob_Clr_ErrorDescription( + CIM_ConcreteJob* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ErrorDescription; + KString_Clr(field); + } +} + +KINLINE void CIM_ConcreteJob_Set_RecoveryAction( + CIM_ConcreteJob* self, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16* field = (KUint16*)&self->RecoveryAction; + KUint16_Set(field, x); + } +} + +KINLINE void CIM_ConcreteJob_Null_Reco... [truncated message content] |
From: <mik...@us...> - 2008-07-04 18:39:15
|
Revision: 705 http://omc.svn.sourceforge.net/omc/?rev=705&view=rev Author: mike-brasher Date: 2008-07-04 11:39:23 -0700 (Fri, 04 Jul 2008) Log Message: ----------- First cut. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c Added Paths: ----------- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.h cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/Makefile.am cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/SSHCapabilitiesProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/SSHElementCapabilitiesProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/SSHServiceProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/SSHServiceProvider.h Removed Paths: ------------- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.h Modified: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am 2008-07-03 21:09:46 UTC (rev 704) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am 2008-07-04 18:39:23 UTC (rev 705) @@ -7,15 +7,15 @@ INCLUDES = -I$(top_builddir) liblinux_sshserviceprovider_la_SOURCES = \ - SSHServiceProvider.c \ - SSHElementCapabilitiesProvider.c \ - SSHCapabilitiesProvider.c \ - SSHServiceProvider.h + SSHDResource.c \ + SSHProtocolServiceProvider.c \ + SSHCapabilitiesProvider.c \ + SSHElementCapabilitiesProvider.c liblinux_sshserviceprovider_la_LDFLAGS = \ + -lkonkret \ -lpthread \ -lsblim_cmpiutil \ -version-info 1 #liblinux_sshserviceprovider_la_LIBADD = -lkonkret - Modified: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c 2008-07-03 21:09:46 UTC (rev 704) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c 2008-07-04 18:39:23 UTC (rev 705) @@ -1,316 +1,185 @@ -/* - * (C) Copyright Novell, Inc. 2008 - * - * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE - * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE - * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. - * - * You can obtain a current copy of the Eclipse Public License from - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * Author: Bart Whiteley <bwhiteley suse.de> - * - */ +#include <konkret/konkret.h> +#include "SSHCapabilities.h" +#include "SSHDResource.h" -#include <stdio.h> -#include <stdlib.h> // for free -#include <string.h> // for strdup -#include <stdarg.h> -#include <errno.h> +static const CMPIBroker* _cb = NULL; -#include <cmpi/cmpidt.h> -#include <cmpi/cmpift.h> -#include <cmpi/cmpimacs.h> - -#include <cmpiutil/base.h> -#include <cmpiutil/exec.h> -#include <cmpiutil/ioUtils.h> -#include <cmpiutil/string.h> - -#include "SSHServiceProvider.h" - -#define CAP_INST_ID "SBLIM:Linux_SSHCapabilities" - -/* A simple stderr logging/tracing facility. */ -#ifndef _CMPI_TRACE -#define _CMPI_TRACE(tracelevel,args) _logstderr args -static void _logstderr(char *fmt,...) +static void SSHCapabilitiesInitialize() { - va_list ap; - va_start(ap,fmt); - vfprintf(stderr,fmt,ap); - va_end(ap); - fprintf(stderr,"\n"); } -#endif - -// ---------------------------------------------------------------------------- -// CMPI INSTANCE PROVIDER FUNCTIONS -// ---------------------------------------------------------------------------- - -CMPIObjectPath* getSSHCapabilitiesInstanceName(CMPIStatus* status) +static CMPIStatus SSHCapabilitiesCleanup( + CMPIInstanceMI* mi, + const CMPIContext* cc, + CMPIBoolean term) { - CMPIObjectPath* cop = CMNewObjectPath(_BROKER, "root/cimv2", - "Linux_SSHCapabilities", status); - CMPIValue val; - val.string = CMNewString(_BROKER, CAP_INST_ID, status); - CMAddKey(cop, "InstanceID", &val, CMPI_string); - return cop; + CMReturn(CMPI_RC_OK); } -static CMPIInstance* getSSHCapabilitiesInstance(CMPIStatus* status) +static CMPIStatus SSHCapabilitiesEnumInstanceNames( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) { - CMPIObjectPath* cop = getSSHCapabilitiesInstanceName(status); - CMPIInstance* inst = CMNewInstance(_BROKER, cop, status); - updateInstFromPath(inst, cop, status); - CMPIValue val; - - val.string = CMNewString(_BROKER, "Linux_SSHCapabilities", status); - CMSetProperty(inst, "ElementName", &val, CMPI_string); - - val.array = CMNewArray(_BROKER, 0, CMPI_uint16, status); - CMSetProperty(inst, "RequestedStatesSupported", &val, CMPI_uint16A); - - FILE* sshd_config = fopen("/etc/ssh/sshd_config", "r"); - if (sshd_config == NULL) - { - if (status) - { - status->rc = CMPI_RC_ERR_FAILED; - status->msg = CMNewString(_BROKER, strerror(errno), NULL); - } - return NULL; - } - char* line = NULL; - size_t linelen = 0; - char* proto1 = NULL; - char* proto2 = NULL; - for(;;) - { - if (NULL == cmpiutilReadLine(sshd_config, &line, &linelen)) - { - break; - } - const char* tline = cmpiutilStrLTrim(line); - if (cmpiutilStrStartsWith(tline, "Protocol")) - { - char* hash = strchr(tline, '#'); - proto1 = strchr(tline, '1'); - proto2 = strchr(tline, '2'); - if (hash && proto1 > hash) proto1 = NULL; - if (hash && proto2 > hash) proto2 = NULL; - break; - } - } - if (line) free(line); - fclose(sshd_config); - if (proto1 == NULL && proto2 == NULL) - { - // config file didn't specify, go with probably sshd defaults - proto1 = proto2 = "1"; - } - int ralen = 0; - if (proto1) ralen+= 1; - if (proto2) ralen+= 1; - - CMPIArray* ra = CMNewArray(_BROKER, ralen, CMPI_uint16, status); - if (proto1) - { - val.uint16 = 2; - CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); - } - if (proto2) - { - val.uint16 = 3; - CMSetArrayElementAt(ra, proto1? 1: 0, &val, CMPI_uint16); - } - - val.array = ra; - CMSetProperty(inst, "SupportedSSHVersions", &val, CMPI_uint16A); - - ra = CMNewArray(_BROKER, 1, CMPI_uint16, status); - val.uint16 = 3; - CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); - val.array = ra; - CMSetProperty(inst, "SupportedEncryptionAlgorithms", &val, CMPI_uint16A); - - - val.uint16 = 0; - CMSetProperty(inst, "MaxListeningPorts", &val, CMPI_uint16); - val.uint16 = 0; - CMSetProperty(inst, "MaxConnections", &val, CMPI_uint16); - - val.boolean = 0; - CMSetProperty(inst, "ElementNameEditSupported", &val, CMPI_boolean); - CMSetProperty(inst, "ListeningPortManagementSupported", &val, CMPI_boolean); - //CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); - - return inst; + return KDefaultEnumerateInstanceNames( + _cb, mi, cc, cr, cop); } -static CMPIStatus SSHCapabilitiesCleanup( - CMPIInstanceMI * self, - const CMPIContext * ctx, - CMPIBoolean terminating) +static CMPIStatus SSHCapabilitiesEnumInstances( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) { - CMPIStatus st = { CMPI_RC_OK, NULL }; - return st; -} + SSHCapabilities x; + SSHCapabilities_Init(&x, _cb, KNameSpace(cop)); + /* InstanceID */ + SSHCapabilities_Set_InstanceID(&x, "SBLIM:Linux_SSHCapabilities"); -// ---------------------------------------------------------------------------- + /* ElementName */ + SSHCapabilities_Set_ElementName(&x, "Linux_SSHCapabilities"); + /* RequestedStatesSupported */ + SSHCapabilities_Init_RequestedStatesSupported(&x, 0); -static CMPIStatus SSHCapabilitiesEnumInstanceNames( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op) -{ - _CMPI_TRACE(1,("EnumInstanceNames() called, ctx %p, result %p, reference %p", ctx, rslt, op)); - CMPIStatus status = {CMPI_RC_OK, NULL}; + /* ElementNameEditSupported */ + SSHCapabilities_Set_ElementNameEditSupported(&x, 0); + /* MaxElementNameLen */ + SSHCapabilities_Set_MaxElementNameLen(&x, 65535); - CMReturnObjectPath(rslt, getSSHCapabilitiesInstanceName(&status)); - CMReturnDone(rslt); - status.rc = CMPI_RC_OK; - status.msg = NULL; + /* MaxConnections */ + SSHCapabilities_Set_MaxConnections(&x, 65535); - _CMPI_TRACE(1,("EnumInstanceNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} + /* SupportedSSHVersions */ + { + struct SSHDConfig conf; + CMPICount index = 0; + if (GetSSHDConfig(&conf) != 0) + KReturn2(_cb, ERR_FAILED, "failed to access sshd_config"); + SSHCapabilities_Init_SupportedSSHVersions(&x, conf.v1 + conf.v2); + if (conf.v1) + SSHCapabilities_Set_SupportedSSHVersions_SSHv1(&x, index++); -static CMPIStatus SSHCapabilitiesEnumInstances( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char ** properties) -{ - CMPIStatus status = {CMPI_RC_OK, NULL}; + if (conf.v2) + SSHCapabilities_Set_SupportedSSHVersions_SSHv2(&x, index++); + } - _CMPI_TRACE(1,("EnumInstances() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); + /* SupportedEncryptionAlgorithms */ + SSHCapabilities_Init_SupportedEncryptionAlgorithms(&x, 1); + SSHCapabilities_Set_SupportedEncryptionAlgorithms_DES3(&x, 0); - CMReturnInstance(rslt, getSSHCapabilitiesInstance(&status)); - CMReturnDone(rslt); + /* ListeningPortManagementSupported */ + SSHCapabilities_Set_ListeningPortManagementSupported(&x, 0); - status.rc = CMPI_RC_OK; - status.msg = NULL; + /* MaxListeningPorts */ + SSHCapabilities_Set_MaxListeningPorts(&x, 65535); - _CMPI_TRACE(1,("EnumInstances() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + KReturnInstance(cr, x); + + KReturn(OK); } - -// ---------------------------------------------------------------------------- - - static CMPIStatus SSHCapabilitiesGetInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char ** properties) + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) { - CMPIStatus status = {CMPI_RC_OK, NULL}; /* Return status of CIM operations */ - - _CMPI_TRACE(1,("GetInstance() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); - - CMReturnInstance(rslt, getSSHCapabilitiesInstance(&status)); - CMReturnDone(rslt); - - status.rc = CMPI_RC_OK; - status.msg = NULL; - - _CMPI_TRACE(1,("GetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + return KDefaultGetInstance( + _cb, mi, cc, cr, cop, properties); } - -// ---------------------------------------------------------------------------- - - static CMPIStatus SSHCapabilitiesCreateInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const CMPIInstance * inst) + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci) { - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("CreateInstance() called, ctx %p, rslt %p, op %p, inst %p", ctx, rslt, op, inst)); - _CMPI_TRACE(1,("CreateInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } - -// ---------------------------------------------------------------------------- - -#ifdef CMPI_VER_100 -#define SSHCapabilitiesSetInstance SSHCapabilitiesModifyInstance -#endif - -static CMPIStatus SSHCapabilitiesSetInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const CMPIInstance * inst, - const char ** properties) +static CMPIStatus SSHCapabilitiesModifyInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci, + const char** properties) { - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("SetInstance() called, ctx %p, rslt %p, op %p, inst %p, properties %p", ctx, rslt, op, inst, properties)); - _CMPI_TRACE(1,("SetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } -// ---------------------------------------------------------------------------- - - -/* DeleteInstance() - delete/remove the specified instance. */ static CMPIStatus SSHCapabilitiesDeleteInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op) + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) { - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("DeleteInstance() called, ctx %p, rslt %p, op %p", ctx, rslt, op)); - _CMPI_TRACE(1,("DeleteInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } -// ---------------------------------------------------------------------------- - - static CMPIStatus SSHCapabilitiesExecQuery( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char * query, - const char * lang) + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* lang, + const char* query) { - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("ExecQuery() called, ctx %p, rslt %p, op %p, query %s, lang %s", ctx, rslt, op, query, lang)); - _CMPI_TRACE(1,("ExecQuery() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } +CMInstanceMIStub(SSHCapabilities, SSHCapabilities, _cb, SSHCapabilitiesInitialize()) +static CMPIStatus SSHCapabilitiesMethodCleanup( + CMPIMethodMI* mi, + const CMPIContext* cc, + CMPIBoolean term) +{ + CMReturn(CMPI_RC_OK); +} -/***************************************************************************/ +static CMPIStatus SSHCapabilitiesInvokeMethod( + CMPIMethodMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* meth, + const CMPIArgs* in, + CMPIArgs* out) +{ + return SSHCapabilities_DispatchMethod( + _cb, mi, cc, cr, cop, meth, in, out); +} +CMMethodMIStub( + SSHCapabilities, + SSHCapabilities, + _cb, + SSHCapabilitiesInitialize()) -CMInstanceMIStub( SSHCapabilities, Linux_SSHCapabilities, - _BROKER, CMNoHook); +KUint16 SSHCapabilities_CreateGoalSettings( + const CMPIBroker* cb, + CMPIMethodMI* mi, + const CMPIContext* context, + const SSHCapabilitiesRef* self, + const KStringA* TemplateGoalSettings, + KStringA* SupportedGoalSettings, + CMPIStatus* status) +{ + KUint16 result = KUINT16_INIT; + KSetStatus(status, ERR_NOT_SUPPORTED); + return result; +} + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.c =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.c (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.c 2008-07-04 18:39:23 UTC (rev 705) @@ -0,0 +1,195 @@ +#include <stdio.h> +#include <string.h> +#include <ctype.h> +#include <stdlib.h> +#include <ctype.h> +#include <unistd.h> +#include <cmpiutil/base.h> +#include <cmpiutil/exec.h> +#include "SSHDResource.h" + +int GetSSHDStatus() +{ + char* cmd[] = { "/etc/init.d/sshd", "status", NULL }; + return cmpiutilSafeSystem(cmd, NULL) == 0 ? 0 : -1; +} + +int GetSSHDConfig(struct SSHDConfig* conf) +{ + FILE* is; + char buf[256]; + + memset(conf, 0, sizeof(struct SSHDConfig)); + + if (!conf || !(is = fopen("/etc/ssh/sshd_config", "r"))) + return -1; + + + while (fgets(buf, sizeof(buf), is) != NULL) + { + /* Check "Protocol" option */ + if (strncmp(buf, "Protocol", 8) == 0 && isspace(buf[8])) + { + if (strchr(buf, '1')) + conf->v1 = 1; + if (strchr(buf, '2')) + conf->v2 = 1; + } + } + + /* If Protocol option not encountered, then default is 1,2 */ + if (!conf->v1 && !conf->v2) + { + conf->v1 = 1; + conf->v2 = 1; + } + + fclose(is); + + return 0; +} + +#if 0 +static void _dumpSSHSession(const struct SSHSession* sess) +{ + printf("==== SSHSession\n"); + printf("localAddr{%s}\n", sess->localAddr); + printf("localPort{%u}\n", sess->localPort); + printf("foreignAddr{%s}\n", sess->foreignAddr); + printf("foreignPort{%u}\n", sess->foreignPort); + printf("pid{%u}\n", sess->pid); + printf("program{%s}\n", sess->program); +} +#endif + +int GetSSHSessions( + struct SSHSession** sessions, + size_t* num_sessions) +{ + FILE* is; + char buf[256]; + struct SSHSession* data = NULL; + size_t size = 0; + + if (!sessions || !num_sessions) + return -1; + + *sessions = NULL; + *num_sessions = 0; + + /* + * Run netstat + * -t -- tcp + * -n -- show numerical addresses + * -p show pid and nameo of program + */ + + if (!(is = popen("/bin/netstat -tnp 2> /dev/null", "r"))) + return -1; + + /* For each line of netstat output */ + + while (fgets(buf, sizeof(buf), is) != NULL) + { + size_t n = strlen(buf); + char* end = buf + n; + struct SSHSession sess; + struct SSHSession* ptr; + + memset(&sess, 0, sizeof(sess)); + + /* Remove trailing space */ + + while (end != buf && isspace(end[-1])) + *--end = '\0'; + + /* Skip first line (title header). Ordinary lines start with "tcp" */ + + if (buf[0] != 't') + continue; + + /* Skip lines not ending in "/ssh" */ + + if (n <= 4 || strcmp(end -4, "/ssh") != 0) + continue; + + /* Extract columns (do not split around ':' due to IPV6 addresses) */ + { + char* s; + char* p; + size_t i = 0; + + for (p = strtok_r(buf, " \t", &s); p; p = strtok_r(NULL, " \t", &s)) + { + char* q; + + switch (i) + { + /* Proto */ + case 0: + /* Recv-Q */ + case 1: + /* Send-Q */ + case 2: + break; + /* Local Address */ + case 3: + { + if (!(q = strrchr(p, ':'))) + continue; + + *q = '\0'; + strncat(sess.localAddr, p, sizeof(sess.localAddr)-1); + sess.localPort = atoi(q + 1); + break; + } + /* Foreign Address */ + case 4: + { + if (!(q = strrchr(p, ':'))) + continue; + + *q = '\0'; + strncat(sess.foreignAddr, p,sizeof(sess.foreignAddr)-1); + sess.foreignPort = atoi(q + 1); + break; + } + /* State */ + case 5: + break; + /* PID/Program name */ + case 6: + { + if (!(q = strrchr(p, '/'))) + continue; + + *q = '\0'; + sess.pid = atoi(p); + strncat(sess.program, q + 1, sizeof(sess.program)-1); + break; + } + } + + i++; + } + } + + /* Append session to array */ + + ptr = (struct SSHSession*)realloc(data, (size + 1) * sizeof(sess)); + + if (!ptr) + { + free(data); + fclose(is); + return -1; + } + + data = ptr; + memcpy(&data[size++], &sess, sizeof(sess)); + } + + *sessions = data; + *num_sessions = size; + return 0; +} Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.h =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.h (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHDResource.h 2008-07-04 18:39:23 UTC (rev 705) @@ -0,0 +1,34 @@ +#ifndef _SSHServiceResource_h +#define _SSHServiceResource_h + +#define HIDDEN __attribute__((visibility("hidden"))) + +/* Returns 0 if sshd service is running */ +HIDDEN int GetSSHDStatus(); + +struct SSHDConfig +{ + /* non-zero (1) if sshd supports protocol version 1 */ + int v1; + + /* non-zero (1) if sshd supports protocol version 2 */ + int v2; +}; + +HIDDEN int GetSSHDConfig(struct SSHDConfig* conf); + +struct SSHSession +{ + char localAddr[64]; + unsigned short localPort; + char foreignAddr[64]; + unsigned short foreignPort; + unsigned int pid; + char program[64]; +}; + +HIDDEN int GetSSHSessions( + struct SSHSession** sessions, + size_t* num_sessions); + +#endif /* _SSHServiceResource_h */ Modified: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c 2008-07-03 21:09:46 UTC (rev 704) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c 2008-07-04 18:39:23 UTC (rev 705) @@ -1,406 +1,202 @@ -/* - * (C) Copyright Novell, Inc. 2008 - * - * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE - * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE - * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. - * - * You can obtain a current copy of the Eclipse Public License from - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * Author: Bart Whiteley <bwhiteley suse.de> - * - */ - -#include <stdio.h> -#include <stdlib.h> // for free -#include <string.h> // for strdup -#include <strings.h> // for strcasecmp -#include <stdarg.h> - -#include <cmpi/cmpidt.h> -#include <cmpi/cmpift.h> -#include <cmpi/cmpimacs.h> - +#include <konkret/konkret.h> +#include "SSHElementCapabilities.h" #include <cmpiutil/base.h> #include <cmpiutil/exec.h> -#include <cmpiutil/cmpiSimpleAssoc.h> -#include "SSHServiceProvider.h" +static const CMPIBroker* _cb; -/* A simple stderr logging/tracing facility. */ -#ifndef _CMPI_TRACE -#define _CMPI_TRACE(tracelevel,args) _logstderr args -static void _logstderr(char *fmt,...) +static void SSHElementCapabilitiesInitialize() { - va_list ap; - va_start(ap,fmt); - vfprintf(stderr,fmt,ap); - va_end(ap); - fprintf(stderr,"\n"); } -#endif - -// ---------------------------------------------------------------------------- -// CMPI INSTANCE PROVIDER FUNCTIONS -// ---------------------------------------------------------------------------- - - -static CMPIStatus SSHElementCapabilitiesCleanup( - CMPIInstanceMI * self, - const CMPIContext * ctx, - CMPIBoolean terminating) +static CMPIStatus SSHElementCapabilitiesCleanup( + CMPIInstanceMI* mi, + const CMPIContext* cc, + CMPIBoolean term) { - CMPIStatus st = { CMPI_RC_OK, NULL }; - return st; + CMReturn(CMPI_RC_OK); } - -static CMPIStatus SSHElementCapabilitiesAssociationCleanup( - CMPIAssociationMI * self, - const CMPIContext * ctx, - CMPIBoolean terminating) +static CMPIStatus SSHElementCapabilitiesEnumInstanceNames( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) { - CMPIStatus st = { CMPI_RC_OK, NULL }; - return st; + return KDefaultEnumerateInstanceNames( + _cb, mi, cc, cr, cop); } - -// ---------------------------------------------------------------------------- -// - -CMPIObjectPath* getSSHElementCapabilitiesInstanceName(CMPIStatus* status) +static CMPIStatus SSHElementCapabilitiesEnumInstances( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) { - CMPIObjectPath* cop = CMNewObjectPath(_BROKER, "root/cimv2", - "Linux_SSHElementCapabilities", status); - CMPIValue val; - val.ref = getSSHCapabilitiesInstanceName(status); - CMAddKey(cop, "Capabilities", &val, CMPI_ref); - val.ref = getSSHServiceInstanceName(status); - CMAddKey(cop, "ManagedElement", &val, CMPI_ref); - return cop; -} + const char* ns = KNameSpace(cop); + SSHProtocolServiceRef m; /* ManagedElement */ + SSHCapabilitiesRef c; /* Capabilities */ + SSHElementCapabilities x; + char buf[256]; -static CMPIInstance* getSSHElementCapabilitiesInstance(CMPIStatus* status) -{ - CMPIObjectPath* cop = getSSHElementCapabilitiesInstanceName(status); - CMPIInstance* inst = CMNewInstance(_BROKER, cop, status); - updateInstFromPath(inst, cop, status); - CMPIValue val; - CMPIArray* ra = CMNewArray(_BROKER, 2, CMPI_uint16, status); - val.uint16 = 2; - CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); - val.uint16 = 3; - CMSetArrayElementAt(ra, 1, &val, CMPI_uint16); - val.array = ra; - CMSetProperty(inst, "Characteristics", &val, CMPI_uint16A); - return inst; -} + /* Create SSHElementCapabilities.ManagedElement */ + cmpiutilGetComputerSystemName(buf, sizeof(buf)); + SSHProtocolServiceRef_Init(&m, _cb, ns); + SSHProtocolServiceRef_Set_SystemCreationClassName( + &m, cmpiutilGetComputerSystemClassName()); + SSHProtocolServiceRef_Set_CreationClassName(&m, "Linux_SSHProtocolService"); + SSHProtocolServiceRef_Set_SystemName(&m, buf); + SSHProtocolServiceRef_Set_Name(&m, "SBLIM:Linux_SSHProtocolService"); + /* Create SSHElementCapabilities.Capabilities */ + SSHCapabilitiesRef_Init(&c, _cb, ns); + SSHCapabilitiesRef_Set_InstanceID(&c, "SBLIM:Linux_SSHCapabilities"); -static CMPIStatus SSHElementCapabilitiesEnumInstanceNames( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op) -{ - _CMPI_TRACE(1,("EnumInstanceNames() called, ctx %p, result %p, reference %p", ctx, rslt, op)); - CMPIStatus status = {CMPI_RC_OK, NULL}; + /* Create SSHElementCapabilities */ + SSHElementCapabilities_Init(&x, _cb, ns); + SSHElementCapabilities_Set_ManagedElement(&x, &m); + SSHElementCapabilities_Set_Capabilities(&x, &c); + KReturnInstance(cr, x); - - CMReturnObjectPath(rslt, getSSHElementCapabilitiesInstanceName(&status)); - CMReturnDone(rslt); - status.rc = CMPI_RC_OK; - status.msg = NULL; - - _CMPI_TRACE(1,("EnumInstanceNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_OK); } - - - -static CMPIStatus SSHElementCapabilitiesEnumInstances( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char ** properties) +static CMPIStatus SSHElementCapabilitiesGetInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) { - CMPIStatus status = {CMPI_RC_OK, NULL}; - - _CMPI_TRACE(1,("EnumInstances() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); - - CMReturnInstance(rslt, getSSHElementCapabilitiesInstance(&status)); - CMReturnDone(rslt); - - status.rc = CMPI_RC_OK; - status.msg = NULL; - - _CMPI_TRACE(1,("EnumInstances() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + return KDefaultGetInstance( + _cb, mi, cc, cr, cop, properties); } - -// ---------------------------------------------------------------------------- - - -static CMPIStatus SSHElementCapabilitiesGetInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char ** properties) +static CMPIStatus SSHElementCapabilitiesCreateInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci) { - CMPIStatus status = {CMPI_RC_OK, NULL}; /* Return status of CIM operations */ - - _CMPI_TRACE(1,("GetInstance() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); - - CMReturnInstance(rslt, getSSHElementCapabilitiesInstance(&status)); - CMReturnDone(rslt); - - status.rc = CMPI_RC_OK; - status.msg = NULL; - - _CMPI_TRACE(1,("GetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } - -// ---------------------------------------------------------------------------- - - -static CMPIStatus SSHElementCapabilitiesCreateInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const CMPIInstance * inst) +static CMPIStatus SSHElementCapabilitiesModifyInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci, + const char**properties) { - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("CreateInstance() called, ctx %p, rslt %p, op %p, inst %p", ctx, rslt, op, inst)); - _CMPI_TRACE(1,("CreateInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } - -// ---------------------------------------------------------------------------- - -#ifdef CMPI_VER_100 -#define SSHElementCapabilitiesSetInstance SSHElementCapabilitiesModifyInstance -#endif - -static CMPIStatus SSHElementCapabilitiesSetInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const CMPIInstance * inst, - const char ** properties) +static CMPIStatus SSHElementCapabilitiesDeleteInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) { - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("SetInstance() called, ctx %p, rslt %p, op %p, inst %p, properties %p", ctx, rslt, op, inst, properties)); - _CMPI_TRACE(1,("SetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } -// ---------------------------------------------------------------------------- - - -/* DeleteInstance() - delete/remove the specified instance. */ -static CMPIStatus SSHElementCapabilitiesDeleteInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op) -{ - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("DeleteInstance() called, ctx %p, rslt %p, op %p", ctx, rslt, op)); - _CMPI_TRACE(1,("DeleteInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - -// ---------------------------------------------------------------------------- - - static CMPIStatus SSHElementCapabilitiesExecQuery( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char * query, - const char * lang) + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* lang, + const char* query) { - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("ExecQuery() called, ctx %p, rslt %p, op %p, query %s, lang %s", ctx, rslt, op, query, lang)); - _CMPI_TRACE(1,("ExecQuery() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } - - -// associatorMIFT -// - -static CMPIStatus doRefs(cmpiutilSimpleAssocCtx ctx, - CMPIAssociationMI* self, - const CMPIBroker *broker, - const CMPIContext* context, - const CMPIResult* rslt, - const CMPIObjectPath* op, - const char *assocClass, - const char *resultClass, - const char *role, - const char *resultRole, - const char** properties) +static CMPIStatus SSHElementCapabilitiesAssociationCleanup( + CMPIAssociationMI* mi, + const CMPIContext* cc, + CMPIBoolean term) { - _CMPI_TRACE(1,("doRefs() called, ctx %p, rslt %p, op %p, assocClass %s, resultClass %s, role %s, resultRole %s, properties %p", ctx, rslt, op, assocClass, resultClass, role, resultRole, properties)); - CMPIStatus status = {CMPI_RC_OK, NULL}; - if (assocClass && strcasecmp(assocClass, - "Linux_SSHElementCapabilities") != 0) - { - _CMPI_TRACE(1,("one")); - return status; - } - - CMPIString* cmstr = CMGetClassName(op, &status); - char* cname = CMGetCharsPtr(cmstr, &status); - if (strcasecmp("Linux_SSHCapabilities", cname) == 0) - { - if (role && *role && strcasecmp(role, "Capabilities") != 0) - { - _CMPI_TRACE(1,("two")); - return status; - } - if (resultRole && *resultRole && - strcasecmp(resultRole, "ManagedElement") != 0) - { - _CMPI_TRACE(1,("three")); - return status; - } - if (resultClass && *resultClass && - strcasecmp(resultClass, "Linux_SSHProtocolService") != 0) - { - _CMPI_TRACE(1,("four")); - return status; - } - } - if (strcasecmp("Linux_SSHProtocolService", cname) == 0) - { - if (role && *role && strcasecmp(role, "ManagedElement") != 0) - { - _CMPI_TRACE(1,("five")); - return status; - } - if (resultRole && *resultRole && - strcasecmp(resultRole, "Capabilities") != 0) - { - _CMPI_TRACE(1,("six")); - return status; - } - if (resultClass && *resultClass && - strcasecmp(resultClass, "Linux_SSHCapabilities") != 0) - { - _CMPI_TRACE(1,("seven")); - return status; - } - } - cmpiutilSimpleAssocResults(ctx, - getSSHElementCapabilitiesInstance(&status), &status); - - _CMPI_TRACE(1,("doRefs() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + CMReturn(CMPI_RC_OK); } - -CMPIStatus SSHElementCapabilitiesAssociatorNames( - CMPIAssociationMI* self, - const CMPIContext* ctx, - const CMPIResult* rslt, - const CMPIObjectPath* op, - const char* assocClass, - const char* resultClass, - const char* role, - const char* resultRole) +static CMPIStatus SSHElementCapabilitiesAssociators( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* resultClass, + const char* role, + const char* resultRole, + const char** properties) { - _CMPI_TRACE(1,("associatorNames() called, ctx %p, rslt %p, op %p, assocClass %s, resultClass %s, role %s, resultRole %s", ctx, rslt, op, assocClass, resultClass, role, resultRole)); - CMPIStatus status = cmpiutilSimpleAssociatorNames(doRefs, - self, _BROKER, ctx, rslt, op, assocClass, resultClass, role, - resultRole); + if (!assocClass) + assocClass = "Linux_SSHElementCapabilities"; - _CMPI_TRACE(1,("associatorNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + return KDefaultAssociators(_cb, mi, cc, cr, cop, assocClass, + resultClass, role, resultRole, properties); } -/***************************************************************************/ -CMPIStatus SSHElementCapabilitiesAssociators( - CMPIAssociationMI* self, - const CMPIContext* ctx, - const CMPIResult* rslt, - const CMPIObjectPath* op, - const char* assocClass, - const char* resultClass, - const char* role, - const char* resultRole, - const char** properties) +static CMPIStatus SSHElementCapabilitiesAssociatorNames( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* resultClass, + const char* role, + const char* resultRole) { - _CMPI_TRACE(1,("associators() called, ctx %p, rslt %p, op %p, assocClass %s, resultClass %s, role %s, resultRole %s", ctx, rslt, op, assocClass, resultClass, role, resultRole)); - CMPIStatus status = cmpiutilSimpleAssociators(doRefs, self, _BROKER, - ctx, rslt, op, assocClass, resultClass, role, resultRole, - properties); + if (!assocClass) + assocClass = "Linux_SSHElementCapabilities"; - _CMPI_TRACE(1,("associators() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + return KDefaultAssociatorNames(_cb, mi, cc, cr, cop, + assocClass, resultClass, role, resultRole); } -/***************************************************************************/ -CMPIStatus SSHElementCapabilitiesReferenceNames( - CMPIAssociationMI* self, - const CMPIContext* ctx, - const CMPIResult* rslt, - const CMPIObjectPath* op, - const char* resultClass, - const char* role) +static CMPIStatus SSHElementCapabilitiesReferences( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* role, + const char** properties) { - _CMPI_TRACE(1,("SSHElementCapabilitiesReferenceNames() called, ctx %p, rslt %p, op %p, resultClass %s, role %s", ctx, rslt, op, resultClass, role)); + if (!assocClass) + assocClass = "Linux_SSHElementCapabilities"; - CMPIStatus status = cmpiutilSimpleReferenceNames( - doRefs, self, _BROKER, ctx, rslt, op, resultClass, role); - - - _CMPI_TRACE(1,("SSHElementCapabilitiesReferenceNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + return KDefaultReferences(_cb, mi, cc, cr, cop, assocClass, + role, properties); } - - -/***************************************************************************/ -CMPIStatus SSHElementCapabilitiesReferences( - CMPIAssociationMI* self, - const CMPIContext* ctx, - const CMPIResult* rslt, - const CMPIObjectPath* op, - const char* resultClass, - const char* role, - const char** properties) +static CMPIStatus SSHElementCapabilitiesReferenceNames( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* role) { - _CMPI_TRACE(1,("references() called, ctx %p, rslt %p, op %p, resultClass %s, role %s, properties %p", ctx, rslt, op, resultClass, role, properties)); + if (!assocClass) + assocClass = "Linux_SSHElementCapabilities"; - CMPIStatus status = cmpiutilSimpleReferences( - doRefs, self, _BROKER, ctx, rslt, op, resultClass, role, - properties); - - _CMPI_TRACE(1,("references() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; + return KDefaultReferenceNames( + _cb, mi, cc, cr, cop, assocClass, role); } -CMInstanceMIStub( SSHElementCapabilities, Linux_SSHElementCapabilities, - _BROKER, CMNoHook); -CMAssociationMIStub( SSHElementCapabilities, Linux_SSHElementCapabilities, - _BROKER, CMNoHook); +CMInstanceMIStub( + SSHElementCapabilities, + SSHElementCapabilities, + _cb, + SSHElementCapabilitiesInitialize()) +CMAssociationMIStub( + SSHElementCapabilities, + SSHElementCapabilities, + _cb, + SSHElementCapabilitiesInitialize()) + Deleted: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.c 2008-07-03 21:09:46 UTC (rev 704) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.c 2008-07-04 18:39:23 UTC (rev 705) @@ -1,304 +0,0 @@ -/* - * (C) Copyright Novell, Inc. 2008 - * - * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE - * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE - * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. - * - * You can obtain a current copy of the Eclipse Public License from - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * Author: Bart Whiteley <bwhiteley suse.de> - * - */ - - -#include <stdio.h> -#include <stdlib.h> // for free -#include <string.h> // for strdup -#include <stdarg.h> - -#include <cmpi/cmpidt.h> -#include <cmpi/cmpift.h> -#include <cmpi/cmpimacs.h> - -#include <cmpiutil/base.h> -#include <cmpiutil/exec.h> - -#include "SSHServiceProvider.h" - -/* A simple stderr logging/tracing facility. */ -#ifndef _CMPI_TRACE -#define _CMPI_TRACE(tracelevel,args) _logstderr args -static void _logstderr(char *fmt,...) -{ - va_list ap; - va_start(ap,fmt); - vfprintf(stderr,fmt,ap); - va_end(ap); - fprintf(stderr,"\n"); -} -#endif - -/* Global handle to the CIM broker. This is initialized by the CIMOM when the provider is loaded */ -const CMPIBroker * _BROKER = NULL; - -// ---------------------------------------------------------------------------- -// CMPI INSTANCE PROVIDER FUNCTIONS -// ---------------------------------------------------------------------------- - - -static CMPIStatus Linux_SSHServiceCleanup( - CMPIInstanceMI * self, - const CMPIContext * ctx, - CMPIBoolean terminating) -{ - CMPIStatus st = { CMPI_RC_OK, NULL }; - return st; -} - - -static CMPIStatus Linux_SSHServiceMethodCleanup( - CMPIMethodMI * self, - const CMPIContext * ctx, - CMPIBoolean terminating) -{ - CMPIStatus st = { CMPI_RC_OK, NULL }; - return st; -} - - -// ---------------------------------------------------------------------------- - -int updateInstFromPath(CMPIInstance* inst, const CMPIObjectPath* cop, - CMPIStatus* status) -{ - int i; - int numKeys = CMGetKeyCount(cop, status); - CMPIString* str; - CMPIData data; - char* pname; - for (i = 0; i < numKeys; ++i) - { - data = CMGetKeyAt(cop, i, &str, status); - pname = CMGetCharsPtr(str, status); - CMSetProperty(inst, pname, &(data.value), data.type); - } - return 0; -} - -CMPIObjectPath* getSSHServiceInstanceName(CMPIStatus* status) -{ - CMPIObjectPath* cop = CMNewObjectPath(_BROKER, "root/cimv2", - "Linux_SSHProtocolService", status); - CMPIValue val; - val.string = CMNewString(_BROKER, "Linux_SSHProtocolService", status); - CMAddKey(cop, "CreationClassName", &val, CMPI_string); - val.string = CMNewString(_BROKER, cmpiutilGetComputerSystemClassName(), - status); - CMAddKey(cop, "SystemCreationClassName", &val, CMPI_string); - val.string = CMNewString(_BROKER, "SBLIM:Linux_SSHProtocolService", - status); - CMAddKey(cop, "Name", &val, CMPI_string); - char buf[256]; - cmpiutilGetComputerSystemName(buf, sizeof(buf)); - val.string = CMNewString(_BROKER, buf, status); - CMAddKey(cop, "SystemName", &val, CMPI_string); - return cop; -} - -CMPIInstance* getSSHServiceInstance(CMPIStatus* status) -{ - CMPIObjectPath* cop = getSSHServiceInstanceName(status); - CMPIInstance* inst = CMNewInstance(_BROKER, cop, status); - updateInstFromPath(inst, cop, status); - CMPIValue val; - val.uint16 = 2; - CMSetProperty(inst, "Protocol", &val, CMPI_uint16); - char* cmd[] = {"/etc/init.d/sshd", "status", NULL}; - int rv = cmpiutilSafeSystem(cmd, NULL); - val.uint16 = rv == 0 ? 2 : 3; - CMSetProperty(inst, "EnabledState", &val, CMPI_uint16); - val.uint16 = 0; - CMSetProperty(inst, "MaxConnections", &val, CMPI_uint16); - //CMSetProperty(inst, "RequestedState", &val, dt); - val.string = CMNewString(_BROKER, "Linux_SSHProtocolService", status); - CMSetProperty(inst, "ElementName", &val, CMPI_string); - val.uint16 = rv == 0 ? 2 : 0; - CMPIArray* ra = CMNewArray(_BROKER, 1, CMPI_uint16, status); - CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); - val.array = ra; - - CMSetProperty(inst, "OperationalStatus", &val, CMPI_uint16A); - val.uint16 = rv == 0 ? 2 : 0; - CMSetProperty(inst, "HealthState", &val, CMPI_uint16); - return inst; -} - -static CMPIStatus Linux_SSHServiceEnumInstanceNames( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op) -{ - _CMPI_TRACE(1,("EnumInstanceNames() called, ctx %p, result %p, reference %p", ctx, rslt, op)); - CMPIStatus status = {CMPI_RC_OK, NULL}; - - - CMReturnObjectPath(rslt, getSSHServiceInstanceName(&status)); - CMReturnDone(rslt); - status.rc = CMPI_RC_OK; - status.msg = NULL; - - _CMPI_TRACE(1,("EnumInstanceNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - - - - -static CMPIStatus Linux_SSHServiceEnumInstances( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char ** properties) -{ - CMPIStatus status = {CMPI_RC_OK, NULL}; - - _CMPI_TRACE(1,("EnumInstances() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); - - CMReturnInstance(rslt, getSSHServiceInstance(&status)); - CMReturnDone(rslt); - - status.rc = CMPI_RC_OK; - status.msg = NULL; - - _CMPI_TRACE(1,("EnumInstances() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - - -// ---------------------------------------------------------------------------- - - -static CMPIStatus Linux_SSHServiceGetInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char ** properties) -{ - CMPIStatus status = {CMPI_RC_OK, NULL}; - - _CMPI_TRACE(1,("GetInstance() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); - - CMReturnInstance(rslt, getSSHServiceInstance(&status)); - CMReturnDone(rslt); - - status.rc = CMPI_RC_OK; - status.msg = NULL; - - _CMPI_TRACE(1,("GetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - - -// ---------------------------------------------------------------------------- - - -static CMPIStatus Linux_SSHServiceCreateInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const CMPIInstance * inst) -{ - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("CreateInstance() called, ctx %p, rslt %p, op %p, inst %p", ctx, rslt, op, inst)); - _CMPI_TRACE(1,("CreateInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - - -// ---------------------------------------------------------------------------- - -#ifdef CMPI_VER_100 -#define Linux_SSHServiceSetInstance Linux_SSHServiceModifyInstance -#endif - -static CMPIStatus Linux_SSHServiceSetInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const CMPIInstance * inst, - const char ** properties) -{ - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; /* Return status of CIM operations. */ - - _CMPI_TRACE(1,("SetInstance() called, ctx %p, rslt %p, op %p, inst %p, properties %p", ctx, rslt, op, inst, properties)); - _CMPI_TRACE(1,("SetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - -// ---------------------------------------------------------------------------- - - -static CMPIStatus Linux_SSHServiceDeleteInstance( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op) -{ - CMPIStatus status = {CMPI_RC_OK, NULL}; - - _CMPI_TRACE(1,("DeleteInstance() called, ctx %p, rslt %p, op %p", ctx, rslt, op)); - _CMPI_TRACE(1,("DeleteInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - -// ---------------------------------------------------------------------------- - - -static CMPIStatus Linux_SSHServiceExecQuery( - CMPIInstanceMI * self, - const CMPIContext * ctx, - const CMPIResult * rslt, - const CMPIObjectPath * op, - const char * query, - const char * lang) -{ - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("ExecQuery() called, ctx %p, rslt %p, op %p, query %s, lang %s", ctx, rslt, op, query, lang)); - _CMPI_TRACE(1,("ExecQuery() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - - -/***************************************************************************/ -CMPIStatus Linux_SSHServiceInvokeMethod( - CMPIMethodMI* self, - const CMPIContext* ctx, - const CMPIResult* rslt, - const CMPIObjectPath* op, - const char* method, - const CMPIArgs* in, - CMPIArgs* out) -{ - CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; - - _CMPI_TRACE(1,("invokeMethod() called, ctx %p, rslt %p, op %p, method %s, in %p, out %p", ctx, rslt, op, method, in, out)); - - _CMPI_TRACE(1,("invokeMethod() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); - return status; -} - -/***************************************************************************/ - - -CMMethodMIStub( Linux_SSHService, Linux_SSHService, _BROKER, CMNoHook); -CMInstanceMIStub( Linux_SSHService, Linux_SSHService, _BROKER, CMNoHook); - Deleted: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.h =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.h 2008-07-03 21:09:46 UTC (rev 704) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.h 2008-07-04 18:39:23 UTC (rev 705) @@ -1,23 +0,0 @@ -/* - * (C) Copyright Novell, Inc. 2008 - * - * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE - * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE - * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. - * - * You can obtain a current copy of the Eclipse Public License from - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * Author: Bart Whiteley <bwhiteley suse.de> - * -*/ - -extern const CMPIBroker * _BROKER; - -CMPIObjectPath* getSSHServiceInstanceName(CMPIStatus* status); - -int updateInstFromPath(CMPIInstance* inst, const CMPIObjectPath* cop, - CMPIStatus* status); - -CMPIObjectPath* getSSHCapabilitiesInstanceName(CMPIStatus* status); - Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/Makefile.am (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/Makefile.am 2008-07-04 18:39:23 UTC (rev 705) @@ -0,0 +1,21 @@ + +provider_LTLIBRARIES = \ + liblinux_sshserviceprovider.la + +providerdir = $(libdir)/cmpi + +INCLUDES = -I$(top_builddir) + +liblinux_sshserviceprovider_la_SOURCES = \ + SSHServiceProvider.c \ + SSHElementCapabilitiesProvider.c \ + SSHCapabilitiesProvider.c \ + SSHServiceProvider.h + +liblinux_sshserviceprovider_la_LDFLAGS = \ + -lpthread \ + -lsblim_cmpiutil \ + -version-info 1 + +#liblinux_sshserviceprovider_la_LIBADD = -lkonkret + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/SSHCapabilitiesProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/SSHCapabilitiesProvider.c (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ref/SSHCapabilitiesProvider.c 2008-07-04 18:39:23 UTC (rev 705) @@ -0,0 +1,316 @@ +/* + * (C) Copyright Novell, Inc. 2008 + * + * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + * + * You can obtain a current copy of the Eclipse Public License from + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * Author: Bart Whiteley <bwhiteley suse.de> + * + */ + +#include <stdio.h> +#include <stdlib.h> // for free +#include <string.h> // for strdup +#include <stdarg.h> +#include <errno.h> + +#include <cmpi/cmpidt.h> +#include <cmpi/cmpift.h> +#include <cmpi/cmpimacs.h> + +#include <cmpiutil/base.h> +#include <cmpiutil/exec.h> +#include <cmpiutil/ioUtils.h> +#include <cmpiutil/string.h> + +#include "SSHServiceProvider.h" + +#define CAP_INST_ID "SBLIM:Linux_SSHCapabilities" + +/* A simple stderr logging/tracing facility. */ +#ifndef _CMPI_TRACE +#define _CMPI_TRACE(tracelevel,args) _logstderr args +static void _logstderr(char *fmt,...) +{ + va_list ap; + va_start(ap,fmt); + vfprintf(stderr,fmt,ap); + va_end(ap); + fprintf(stderr,"\n"); +} +#endif + + +// ---------------------------------------------------------------------------- +// CMPI INSTANCE PROVIDER FUNCTIONS +// ---------------------------------------------------------------------------- + +CMPIObjectPath* getSSHCapabilitiesInstanceName(CMPIStatus* status) +{ + CMPIObjectPath* cop = CMNewObjectPath(_BROKER, "root/cimv2", + "Linux_SSHCapabilities", status); + CMPIValue val; + val.string = CMNewString(_BROKER, CAP_INST_ID, status); + CMAddKey(cop, "InstanceID", &val, CMPI_string); + return cop; +} + +static CMPIInstance* getSSHCapabilitiesInstance(CMPIStatus* status) +{ + CMPIObjectPath* cop = getSSHCapabilitiesInstanceName(status); + CMPIInstance* inst = CMNewInstance(_BROKER, cop, status); + updateInstFromPath(inst, cop, status); + CMPIValue val; + + val.string = CMNewString(_BROKER, "Linux_SSHCapabilities", status); + CMSetProperty(inst, "ElementName", &val, CMPI_string); + + val.array = CMNewArray(_BROKER, 0, CMPI_uint16, status); + CMSetProperty(inst, "RequestedStatesSupported", &val, CMPI_uint16A); + + FILE* sshd_config = fopen("/etc/ssh/sshd_config", "r"); + if (sshd_config == NULL) + { + if (status) + { + status->rc = CMPI_RC_ERR_FAILED; + status->msg = CMNewString(_BROKER, strerror(errno), NULL); + } + return NULL; + } + char* line = NULL; + size_t linelen = 0; + char* proto1 = NULL; + char* proto2 = NULL; + for(;;) + { + if (NULL == cmpiutilReadLine(sshd_config, &line, &linelen)) + { + break; + } + const char* tline = cmpiutilStrLTrim(line); + if (cmpiutilStrStartsWith(tline, "Protocol")) + { + char* hash = strchr(tline, '#'); + proto1 = strchr(tline, '1'); + proto2 = strchr(tline, '2'); + if (hash && proto1 > hash) proto1 = NULL; + if (hash && proto2 > hash) proto2 = NULL; + break; + } + } + if (line) free(line); + fclose(sshd_config); + if (proto1 == NULL && proto2 == NULL) + { + // config file didn't specify, go with probably sshd defaults + proto1 = proto2 = "1"; + } + int ralen = 0; + if (proto1) ralen+= 1; + if (proto2) ralen+= 1; + + CMPIArray* ra = CMNewArray(_BROKER, ralen, CMPI_uint16, status); + if (proto1) + { + val.uint16 = 2; + CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); + } + if (proto2) + { + val.uint16 = 3; + CMSetArrayElementAt(ra, proto1? 1: 0, &val, CMPI_uint16); + } + + val.array = ra; + CMSetProperty(inst, "SupportedSSHVersions", &val, CMPI_uint16A); + + ra = CMNewArray(_BROKER, 1, CMPI_uint16, status); + val.uint16 = 3; + CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); + val.array = ra; + CMSetProperty(inst, "SupportedEncryptionAlgorithms", &val, CMPI_uint16A); + + + val.uint16 = 0; + CMSetProperty(inst, "MaxListeningPorts", &val, CMPI_uint16); + val.uint16 = 0; + CMSetProperty(inst, "MaxConnections", &val, CMPI_uint16); + + val.boolean = 0; + CMSetProperty(inst, "ElementNameEditSupported", &val, CMPI_boolean); + CMSetProperty(inst, "ListeningPortManagementSupported", &val, CMPI_boolean); + //CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); + + return inst; +} + +static CMPIStatus SSHCapabilitiesCleanup( + CMPIInstanceMI * self, + const CMPIContext * ctx, + CMPIBoolean terminating) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + return st; +} + + + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHCapabilitiesEnumInstanceNames( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op) +{ + _CMPI_TRACE(1,("EnumInstanceNames() called, ctx %p, result %p, reference %p", ctx, rslt, op)); + CMPIStatus status = {CMPI_RC_OK, NULL}; + + + CMReturnObjectPath(rslt, getSSHCapabilitiesInstanceName(&status)); + CMReturnDone(rslt); + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("EnumInstanceNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + + + +static CMPIStatus SSHCapabilitiesEnumInstances( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_OK, NULL}; + + _CMPI_TRACE(1,("EnumInstances() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); + + CMReturnInstance(rslt, getSSHCapabilitiesInstance(&status)); + CMReturnDone(rslt); + + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("EnumInstances() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHCapabilitiesGetInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_OK, NULL}; /* Return status of CIM operati... [truncated message content] |
From: <ba...@us...> - 2008-07-03 21:09:46
|
Revision: 704 http://omc.svn.sourceforge.net/omc/?rev=704&view=rev Author: bartw Date: 2008-07-03 14:09:46 -0700 (Thu, 03 Jul 2008) Log Message: ----------- fixed package name Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac Modified: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac 2008-07-03 19:44:34 UTC (rev 703) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac 2008-07-03 21:09:46 UTC (rev 704) @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(sblim-cmpi-fan_profile, 1.0.0) +AC_INIT(sblim-cmpi-ssh_service_profile, 1.0.0) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src]) AC_CONFIG_HEADER([config.h]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-07-03 19:44:29
|
Revision: 703 http://omc.svn.sourceforge.net/omc/?rev=703&view=rev Author: bartw Date: 2008-07-03 12:44:34 -0700 (Thu, 03 Jul 2008) Log Message: ----------- added ssh service profile Added Paths: ----------- cmpiprofiles/sblim-cmpi-ssh_service_profile/ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/AUTHORS cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/COPYING cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/ChangeLog cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/INSTALL cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/Makefile.am cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/NEWS cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/README cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/bootstrap.sh cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/Makefile.am cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.mof cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.registration cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.c cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHServiceProvider.h Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/AUTHORS =================================================================== Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/COPYING =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/COPYING (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/COPYING 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,19 @@ +SBLIM work within the OMC project is primarily constrained by EPL License. + +Please pay attention to the license for each file. + + +Notice for Projects/Files Released Under the EPL License + +/****************************************************************************** +* Copyright (c) 2008, Novell, Inc. All rights reserved. +* +* This file is provided under the terms of the Eclipse Public License v1.0 +* ("Agreement"). Any use, reproduction or distribution of this file +* constitutes recipient's acceptance of the agreement. +* +* You can obtain a current copy of the Eclipse Public License from +* http://www.opensource.org/licenses/eclipse-1.0.php +* +******************************************************************************/ + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/ChangeLog =================================================================== Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/INSTALL =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/INSTALL (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/INSTALL 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/Makefile.am (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/Makefile.am 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,10 @@ +## Process this file with automake to produce Makefile.in + +AUTOMAKE_OPTIONS = gnu + +SUBDIRS = \ + . \ + src \ + mof + + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/NEWS =================================================================== Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/README =================================================================== Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/bootstrap.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/bootstrap.sh (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/bootstrap.sh 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,9 @@ +#!/bin/sh + +rm -rf config.cache config.guess config.sub depcomp missing mkinstalldirs autom4te.cache + +aclocal \ +&& autoconf \ +&& autoheader \ +&& libtoolize --force --copy \ +&& automake --add-missing Property changes on: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/bootstrap.sh ___________________________________________________________________ Name: svn:executable + * Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/configure.ac 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,167 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.57) +AC_INIT(sblim-cmpi-fan_profile, 1.0.0) +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([src]) +AC_CONFIG_HEADER([config.h]) +AC_PROG_LIBTOOL + +AC_PREFIX_DEFAULT(/usr) + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_LEX +AC_PROG_YACC + +AC_PATH_PROG(RM, rm, rm) +AC_PATH_PROG(MV, mv, mv) +AC_PATH_PROG(CP, cp, cp) + +DEBUG_FLAGS="-DDEBUG -g" # Additional debugging flags. +FULL_DEBUG_FLAGS="-D_GLIBCXX_DEBUG" # Additional debugging flags. +OPT_FLAGS=" -DNDEBUG -O2" # Additional optimization flags. + + +##NOTE: whereever CXXFLAGS is used, we need to also use CPPFLAGS, for the AC_CHECK_HEADERS - +## It now uses compile (primarily) but still uses pre-processor for interim transition / backward compatibility +## pre-processor needs the CPPFLAGS + + +####################################################################### +# Process additional search dirs if specified +AC_ARG_WITH(search-dir, + [ --with-search-dir=PATH Specify an additional directory to look for include/ and lib/ sub dirs ], + [ + if test "x$withval" != "xno" ; then + CXXFLAGS="$CXXFLAGS -I$withval/include" + CPPFLAGS="$CPPFLAGS -I$withval/include" + CFLAGS="$CFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" + fi + ] +) + +####################################################################### +# Process additional search dirs if specified +cmpiIncDir="" +AC_ARG_WITH(cmpi-include-dir, + [ --with-cmpi-include-dir=PATH Specify locaction of the CMPI header files ], + [ + if test "x$withval" != "xno" ; then + CXXFLAGS="$CXXFLAGS -I$withval" + CPPFLAGS="$CPPFLAGS -I$withval" + CFLAGS="$CFLAGS -I$withval" + cmpiIncDir="$withval" + fi + ] +) + +if test "x$cmpiIncDir" == "x"; then + cmpiIncDir="/usr/include/cmpi" + CXXFLAGS="$CXXFLAGS -I$cmpiIncDir" + CPPFLAGS="$CPPFLAGS -I$cmpiIncDir" + CFLAGS="$CFLAGS -I$cmpiIncDir" + AC_MSG_WARN("You didn't specify the location of the cmpi include files. Using default of /usr/include/cmpi") +fi + + +debuglevel="0" +####################################################################### +# Set the debug flag if specified +AC_ARG_ENABLE(debug-mode, + [--enable-debug-mode Enable debugging mode], + [ + debuglevel="1" + ] +) + +AC_ARG_WITH(debug-level, + [ --with-debug-level=LEVEL Specify a debug level valid values: 0=none 1=partial debug 2=full debug ], + [ + case "x$withval" in + x0|xno) + debuglevel="0";; + x1) + debuglevel="1";; + x2) + debuglevel="2";; + *) + AC_MSG_WARN("Invalid debug level specified. Valid values are 0, 1 or 2") + exit 1;; + esac + ] +) + +case $debuglevel in +1) + AC_DEFINE(XEN_VMBUILDER_DEBUG, 1, "Debugging Flag") + CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS -Wall" + CPPFLAGS="$CPPFLAGS $DEBUG_FLAGS -Wall" + CFLAGS=" $CFLAGS $DEBUG_FLAGS -Wall" + LDFLAGS=" $LDFLAGS $DEBUG_FLAGS";; +2) + AC_DEFINE(XEN_VMBUILDER_DEBUG, 2, "Debugging Flag") + CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS -Wall" + CPPFLAGS="$CPPFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS -Wall" + CFLAGS=" $CFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS -Wall" + LDFLAGS=" $LDFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS";; +*) + CXXFLAGS="$CXXFLAGS $OPT_FLAGS -Wall" + CPPFLAGS="$CPPFLAGS $OPT_FLAGS -Wall" + CFLAGS=" $CFLAGS $OPT_FLAGS -Wall" + LDFLAGS=" $LDFLAGS $OPT_FLAGS";; +esac + +##################################################### + +# Checks for libraries. +#AC_CHECK_LIB([pthread], [main], [LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([crypto], [main], [LIBS="$LIBS"], [AC_MSG_ERROR(Must have libcrypto \(openssl-devel\) or build will fail)]) + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h sys/time.h sys/param.h sys/vfs.h],,[AC_MSG_ERROR(Missing headers: likely won't compile)]) + +#AC_LANG_CPLUSPLUS +#AC_CHECK_HEADERS([cimple/cimple.h],[HAVE_CIMPLE="1"],[HAVE_CIMPLE="0"]) +#AM_CONDITIONAL(DO_CIMPLE_PROVIDERS, test "$HAVE_CIMPLE" = 1) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_UID_T +AC_HEADER_TIME +AC_TYPE_MODE_T +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_CLOSEDIR_VOID +AC_REPLACE_FNMATCH +AC_FUNC_FORK +AC_FUNC_LSTAT +AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_FUNC_CHOWN +AC_FUNC_SETVBUF_REVERSED +AC_FUNC_STAT +AC_FUNC_STRERROR_R + +AC_CHECK_FUNCS([gettimeofday memset regcomp strchr strdup strerror strstr strtol strtoul uname]) + +AC_CONFIG_FILES([Makefile + src/Makefile + mof/Makefile + ]) +AC_OUTPUT Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/Makefile.am (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/Makefile.am 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,8 @@ +mof_DATA = \ + linux-ssh-service-profile.mof \ + linux-ssh-service-profile.registration + +mofdir = $(datadir)/mof/$(PACKAGE_NAME) + +EXTRA_DIST = $(mof_DATA) + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.mof =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.mof (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.mof 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,426 @@ +// =================================================================== +// Title: Linux_SSHServiceProfile +// =================================================================== +//#pragma inLine ("Includes/copyright.inc") +// Copyright 2005 Novell, Inc +// All rights reserved. +// ================================================================== +// +// current file version 0.0.2 +// +// 14 Sep 2005 - Initial Version +// - OMC_RegisteredSSHServiceProfile +// - OMC_ElementConformsToSSHServiceProfile +// ================================================================== + +#pragma Locale ("en_US") + +// ================================================================== +// Compile prerequisite: Core and CIM_Interop MOFs +// ================================================================== + +// ================================================================== +// Linux_SSHProtocolService : CIM_ProtocolService +// ================================================================== + [Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's SSH Service")] +class Linux_SSHProtocolService : CIM_ProtocolService { +}; + + +// ================================================================== +// Linux_SSHCapabilities : CIM_SSHCapabilities +// ================================================================== + [Version ( "0.0.1" ), Description ( + "Linux's instrumentation of SMASH's SSH Capabilities")] +class Linux_SSHCapabilities : CIM_SSHCapabilities { +}; + + +// ================================================================== +// Linux_SSH_SSHProtocolEndpoint : CIM_SSHProtocolEndpoint +// ================================================================== + [Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's SSH protocol endpoint")] +class Linux_SSH_SSHProtocolEndpoint : CIM_SSHProtocolEndpoint { + [Description ( + "LogonId of the authenticated user")] + String AuthenticatedUser; + + [Description ( + "Remote host name")] + String RemoteHost; + + [Description ( + "Remote port")] + UInt32 RemotePort; +}; + + +// ================================================================== +// Linux_SSH_TCPProtocolEndpoint : CIM_TCPProtocolEndpoint +// ================================================================== + [Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's TCP protocol endpoint for ssh")] +class Linux_SSH_TCPProtocolEndpoint : CIM_TCPProtocolEndpoint { +}; + + +// ================================================================== +// Linux_HostedSSHService : CIM_HostedService +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_HostedSSHService : CIM_HostedService { + + [Override ( "Antecedent" ), Key, Description ( + "The computer system that hosts the SSHProtocolService")] + Linux_UnitaryComputerSystem REF Antecedent; + + [Override ( "Dependent" ), Key, Description ( + "The SSHProtocolService that is hosted on the computer system.")] + Linux_SSHProtocolService REF Dependent; +}; + + +// ================================================================== +// Linux_SSHElementCapabilities : CIM_ElementCapabilities +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHElementCapabilities : CIM_ElementCapabilities { + + [Override ( "ManagedElement" ), Key, Description ( + "The SSHProtocolService that has the capabilities.")] + Linux_SSHProtocolService REF ManagedElement; + + [Override ( "Capabilities" ), Key, Description ( + "The SSHCapabilities that the SSH Service has.")] + Linux_SSHCapabilities REF Capabilities; +}; + + + +// ================================================================== +// Linux_SSHServiceProcess : CIM_ServiceProcess +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHServiceProcess : CIM_ServiceProcess { + + [Override ( "Service" ), Key, Description ( + "The SSHProtocolService that is associated to a process.")] + Linux_SSHProtocolService REF Service; + + [Override ( "Process" ), Key, Description ( + "The process that the SSHProtocolService is running in.")] + Linux_UnixProcess REF Process; +}; + + + +// ================================================================== +// Linux_SSHServiceAccessBySAP : CIM_ServiceAccessBySAP +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHServiceAccessBySAP : CIM_ServiceAccessBySAP { + + [Override ( "Antecedent" ), Key, Description ( + "The SSHProtocolService")] + Linux_SSHProtocolService REF Antecedent; + + [Override ( "Dependent" ), Key, Description ( + "The TCPProtocolEndpoint access point for the SSH Service")] + Linux_SSH_TCPProtocolEndpoint REF Dependent; +}; + + + +// ================================================================== +// Linux_SSHHostedTCPProtocolEndpoint : CIM_HostedAccessPoint +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHHostedTCPProtocolEndpoint : CIM_HostedAccessPoint { + + [Override ( "Antecedent" ), Key, Description ( + "The hosting Computer System")] + Linux_UnitaryComputerSystem REF Antecedent; + + [Override ( "Dependent" ), Key, Description ( + "The TCPProtocolEndpoint access point hosted on the system")] + Linux_SSH_TCPProtocolEndpoint REF Dependent; +}; + + + +// ================================================================== +// Linux_SSHHostedSSHProtocolEndpoint : CIM_HostedAccessPoint +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHHostedSSHProtocolEndpoint : CIM_HostedAccessPoint { + + [Override ( "Antecedent" ), Key, Description ( + "The hosting Computer System")] + Linux_UnitaryComputerSystem REF Antecedent; + + [Override ( "Dependent" ), Key, Description ( + "The SSHProtocolEndpoint access point hosted on the system")] + Linux_SSH_SSHProtocolEndpoint REF Dependent; +}; + + +// ================================================================== +// Linux_SSHServiceProvidesSSHEndpoint : CIM_ProvidesEndpoint +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHServiceProvidesSSHEndpoint : CIM_ProvidesEndpoint { +}; + + + +// ================================================================== +// Linux_SSHSettingData : CIM_SSHSettingData +// ================================================================== + [Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's SSH SettingData")] +class Linux_SSHSettingData : CIM_SSHSettingData { + + [Description ( + "The users's environment variables that are accepted.")] + String AcceptEnv[]; + + [Description ( + "The allowed groups.")] + String AllowGroups[]; + + [Description ( + "The allowed users.")] + String AllowUsers[]; + + [Description ( + "Allow TCP Forwarding.")] + Boolean AllowTCPForwarding; + + [Description ( + "The authorized keys file")] + String AuthorizedKeysFile; + + [Description ( + "Warning message banner")] + String Banner; + + [Description ( + "Challenge response authentication.")] + Boolean ChallengeResponseAuthentication; + + [Description ( + "The ciphers allowed.")] + String Ciphers[]; + + [Description ( + "Number of idle seconds before a response request is sent.")] + UInt16 ClientAliveInterval; + + [Description ( + "Maximum nubmer of ClientAlive pings sent before terminating session")] + UInt16 ClientAliveCountMax; + + [Description ( + "The group names for which member login is disallowed.")] + String DenyGroups[]; + + [Description ( + "The user names for which login is disallowed.")] + String DenyUsers[]; + + [Description ( + "whether remote hosts are allowed to connect to ports forwarded for client.")] + Boolean GatewayPorts; + + [Description ( + "The file that contains the process ID of the sshd daemon")] + String PidFile; + +// {"GSSAPIAuthentication", ""},bool +// {"GSSAPICleanupCredentials", ""},bool +// {"HostbasedAuthentication", ""},bool +// {"HostKey", ""},string +// {"IgnoreRhosts", ""},bool +// {"IgnoreUserKnownHosts", ""},bool +// {"KerberosAuthentication", ""},bool +// {"KerberosGetAFSToken", ""},bool +// {"KerberosOrLocalPasswd", ""},bool +// {"KerberosTicketCleanup", ""},bool +// {"KeyRegenerationInterval", ""},uin16 +// {"ListenAddress", ""},string +// {"LoginGraceTime", ""},uint16 +// {"LogLevel", ""},string map +// {"MACs", ""},string[] +// {"MaxAuthTries", ""},uint16 +// {"MaxStartups", ""},uint16 +// {"PasswordAuthentication", ""},bool +// {"PermitEmptyPasswords", ""},bool +// {"PermitRootLogin", ""},bool +// {"PermitUserEnvironment", ""},bool +// {"Port", ""},uint16 +// {"PrintLastLog", ""},bool +// {"PrintMotd", ""},bool +// {"PubkeyAuthentication", ""},bool +// {"RhostsRSAAuthentication", ""},bool +// {"RSAAuthentication", ""},bool +// {"ServerKeyBits", ""},uint16 +// {"StrictModes", ""},bool +// {"Subsystem", ""},string +// {"SyslogFacility", ""},string map +// {"UseDNS", ""},bool +// {"UseLogin", ""},bool +// {"UsePAM", ""},bool +// {"UsePrivilegeSeparation", ""},bool +// {"X11DisplayOffset", ""},uint16 +// {"X11UseLocalhost", ""},bool +// {"XAuthLocation", ""},string +}; + + + + + + + + +// ================================================================== +// Linux_SSHElementSettingData : CIM_ElementSettingData +// ================================================================== + [Association, Abstract, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHElementSettingData : CIM_ElementSettingData { +}; + + +// ================================================================== +// Linux_SSHServiceElementSettingData : Linux_SSHElementSettingData +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHServiceElementSettingData : Linux_SSHElementSettingData { + + [Override ( "ManagedElement" ), Key, Description ( + "The Managed SSHProtocolService")] + Linux_SSHProtocolService REF ManagedElement; + + [Override ( "SettingData" ), Key, Description ( + "The SSHSettingData for the service")] + Linux_SSHSettingData REF SettingData; +}; + + +// ================================================================== +// Linux_SSHEndpointElementSettingData : Linux_SSHElementSettingData +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux instrumentation of SMASH's ssh service")] +class Linux_SSHEndpointElementSettingData : Linux_SSHElementSettingData { + + [Override ( "ManagedElement" ), Key, Description ( + "The Managed SSHProtocolEndpoint")] + Linux_SSH_SSHProtocolEndpoint REF ManagedElement; + + [Override ( "SettingData" ), Key, Description ( + "The SSHSettingData for the service")] + Linux_SSHSettingData REF SettingData; +}; + + + +// ================================================================== +// Linux_ProtocolEndpointProcess +// ================================================================== + [Association, Abstract, Version ( "0.0.1" ), Description ( + "Linux_ProtocolEndpointProcess is an association used to establish " + "relationships between ProtocolEndpoints and Processes. It makes " + "sense when a protocol endpoint represents an individual process. " + "For example, SSHProtocolEndpoints represent an SSH Session, which " + "depending on the implementation may imply a separate process for " + "that endpoint.")] +class Linux_ProtocolEndpointProcess{ + + [Key, Description ( + "The ProtocolEndpoint")] + CIM_ProtocolEndpoint REF Endpoint; + + [Key, Description ( + "The Process")] + CIM_Process REF Process; +}; + + + +// ================================================================== +// Linux_SSHEndpointProcess : Linux_ProtocolEndpointProcess +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "Linux_SSHEndpointProcess is an association used to establish " + "relationships between SSH Sessions (ProtocolEndpoints) and " + "Processes.")] +class Linux_SSHEndpointProcess : Linux_ProtocolEndpointProcess{ + + [Override ( "Endpoint" ), Key, Description ( + "The SSHProtocolEndpoint that owns the process")] + Linux_SSH_SSHProtocolEndpoint REF Endpoint; + + [Override ( "Process" ), Key, Description ( + "The Linux_UnixProcess owned by the ssh session")] + Linux_UnixProcess REF Process; +}; + + + +// ================================================================== +// Linux_SSH_SSHEndpointBindsToTCPEndpoint +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "This association indicates that an SSH Protocol Endpoint is " + "dependent on a TCP Protocol Endpoint for the port number.")] +class Linux_SSH_SSHEndpointBindsToTCPEndpoint : CIM_BindsTo { + + [Override ( "Antecedent" ), Description ( + "The TCP Protocol Endpoint that is accessed by the SSH " + "Protocol Endpoint.")] + Linux_SSH_TCPProtocolEndpoint REF Antecedent; + + [Override ( "Dependent" ), Description ( + "The SSH Protocol Endpoint that is dependent on the TCP " + "Protocol Endpoint (for the port number).")] + Linux_SSH_SSHProtocolEndpoint REF Dependent; +}; + + + +// ================================================================== +// Linux_SSH_TCPEndpointBindsToIPEndpoint +// ================================================================== + [Association, Version ( "0.0.1" ), Description ( + "This association indicates that a TCP Protocol Endpoint is " + "dependent on an IP Protocol Endpoint for the address.")] +class Linux_SSH_TCPEndpointBindsToIPEndpoint : CIM_BindsTo { + + [Override ( "Antecedent" ), Description ( + "The IP Protocol Endpoint that is accessed by the TCP " + "Protocol Endpoint (for address).")] + CIM_IPProtocolEndpoint REF Antecedent; + + [Override ( "Dependent" ), Description ( + "The TCP Protocol Endpoint that is dependent on the IP " + "Protocol Endpoint (for the address).")] + Linux_SSH_TCPProtocolEndpoint REF Dependent; +}; + + + +// ================================================================== +// end of file +// ================================================================== Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.registration =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.registration (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/mof/linux-ssh-service-profile.registration 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,4 @@ +# Classname Namespace ProviderName ProviderModule ProviderTypes ... +Linux_SSHService root/cimv2 Linux_SSHService linux_sshserviceprovider instance method +Linux_SSHCapabilities root/cimv2 Linux_SSHCapabilities linux_sshserviceprovider instance +Linux_SSHElementCapabilities root/cimv2 Linux_SSHElementCapabilities linux_sshserviceprovider instance association Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/Makefile.am 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,21 @@ + +provider_LTLIBRARIES = \ + liblinux_sshserviceprovider.la + +providerdir = $(libdir)/cmpi + +INCLUDES = -I$(top_builddir) + +liblinux_sshserviceprovider_la_SOURCES = \ + SSHServiceProvider.c \ + SSHElementCapabilitiesProvider.c \ + SSHCapabilitiesProvider.c \ + SSHServiceProvider.h + +liblinux_sshserviceprovider_la_LDFLAGS = \ + -lpthread \ + -lsblim_cmpiutil \ + -version-info 1 + +#liblinux_sshserviceprovider_la_LIBADD = -lkonkret + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHCapabilitiesProvider.c 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,316 @@ +/* + * (C) Copyright Novell, Inc. 2008 + * + * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + * + * You can obtain a current copy of the Eclipse Public License from + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * Author: Bart Whiteley <bwhiteley suse.de> + * + */ + +#include <stdio.h> +#include <stdlib.h> // for free +#include <string.h> // for strdup +#include <stdarg.h> +#include <errno.h> + +#include <cmpi/cmpidt.h> +#include <cmpi/cmpift.h> +#include <cmpi/cmpimacs.h> + +#include <cmpiutil/base.h> +#include <cmpiutil/exec.h> +#include <cmpiutil/ioUtils.h> +#include <cmpiutil/string.h> + +#include "SSHServiceProvider.h" + +#define CAP_INST_ID "SBLIM:Linux_SSHCapabilities" + +/* A simple stderr logging/tracing facility. */ +#ifndef _CMPI_TRACE +#define _CMPI_TRACE(tracelevel,args) _logstderr args +static void _logstderr(char *fmt,...) +{ + va_list ap; + va_start(ap,fmt); + vfprintf(stderr,fmt,ap); + va_end(ap); + fprintf(stderr,"\n"); +} +#endif + + +// ---------------------------------------------------------------------------- +// CMPI INSTANCE PROVIDER FUNCTIONS +// ---------------------------------------------------------------------------- + +CMPIObjectPath* getSSHCapabilitiesInstanceName(CMPIStatus* status) +{ + CMPIObjectPath* cop = CMNewObjectPath(_BROKER, "root/cimv2", + "Linux_SSHCapabilities", status); + CMPIValue val; + val.string = CMNewString(_BROKER, CAP_INST_ID, status); + CMAddKey(cop, "InstanceID", &val, CMPI_string); + return cop; +} + +static CMPIInstance* getSSHCapabilitiesInstance(CMPIStatus* status) +{ + CMPIObjectPath* cop = getSSHCapabilitiesInstanceName(status); + CMPIInstance* inst = CMNewInstance(_BROKER, cop, status); + updateInstFromPath(inst, cop, status); + CMPIValue val; + + val.string = CMNewString(_BROKER, "Linux_SSHCapabilities", status); + CMSetProperty(inst, "ElementName", &val, CMPI_string); + + val.array = CMNewArray(_BROKER, 0, CMPI_uint16, status); + CMSetProperty(inst, "RequestedStatesSupported", &val, CMPI_uint16A); + + FILE* sshd_config = fopen("/etc/ssh/sshd_config", "r"); + if (sshd_config == NULL) + { + if (status) + { + status->rc = CMPI_RC_ERR_FAILED; + status->msg = CMNewString(_BROKER, strerror(errno), NULL); + } + return NULL; + } + char* line = NULL; + size_t linelen = 0; + char* proto1 = NULL; + char* proto2 = NULL; + for(;;) + { + if (NULL == cmpiutilReadLine(sshd_config, &line, &linelen)) + { + break; + } + const char* tline = cmpiutilStrLTrim(line); + if (cmpiutilStrStartsWith(tline, "Protocol")) + { + char* hash = strchr(tline, '#'); + proto1 = strchr(tline, '1'); + proto2 = strchr(tline, '2'); + if (hash && proto1 > hash) proto1 = NULL; + if (hash && proto2 > hash) proto2 = NULL; + break; + } + } + if (line) free(line); + fclose(sshd_config); + if (proto1 == NULL && proto2 == NULL) + { + // config file didn't specify, go with probably sshd defaults + proto1 = proto2 = "1"; + } + int ralen = 0; + if (proto1) ralen+= 1; + if (proto2) ralen+= 1; + + CMPIArray* ra = CMNewArray(_BROKER, ralen, CMPI_uint16, status); + if (proto1) + { + val.uint16 = 2; + CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); + } + if (proto2) + { + val.uint16 = 3; + CMSetArrayElementAt(ra, proto1? 1: 0, &val, CMPI_uint16); + } + + val.array = ra; + CMSetProperty(inst, "SupportedSSHVersions", &val, CMPI_uint16A); + + ra = CMNewArray(_BROKER, 1, CMPI_uint16, status); + val.uint16 = 3; + CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); + val.array = ra; + CMSetProperty(inst, "SupportedEncryptionAlgorithms", &val, CMPI_uint16A); + + + val.uint16 = 0; + CMSetProperty(inst, "MaxListeningPorts", &val, CMPI_uint16); + val.uint16 = 0; + CMSetProperty(inst, "MaxConnections", &val, CMPI_uint16); + + val.boolean = 0; + CMSetProperty(inst, "ElementNameEditSupported", &val, CMPI_boolean); + CMSetProperty(inst, "ListeningPortManagementSupported", &val, CMPI_boolean); + //CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); + + return inst; +} + +static CMPIStatus SSHCapabilitiesCleanup( + CMPIInstanceMI * self, + const CMPIContext * ctx, + CMPIBoolean terminating) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + return st; +} + + + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHCapabilitiesEnumInstanceNames( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op) +{ + _CMPI_TRACE(1,("EnumInstanceNames() called, ctx %p, result %p, reference %p", ctx, rslt, op)); + CMPIStatus status = {CMPI_RC_OK, NULL}; + + + CMReturnObjectPath(rslt, getSSHCapabilitiesInstanceName(&status)); + CMReturnDone(rslt); + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("EnumInstanceNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + + + +static CMPIStatus SSHCapabilitiesEnumInstances( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_OK, NULL}; + + _CMPI_TRACE(1,("EnumInstances() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); + + CMReturnInstance(rslt, getSSHCapabilitiesInstance(&status)); + CMReturnDone(rslt); + + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("EnumInstances() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHCapabilitiesGetInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_OK, NULL}; /* Return status of CIM operations */ + + _CMPI_TRACE(1,("GetInstance() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); + + CMReturnInstance(rslt, getSSHCapabilitiesInstance(&status)); + CMReturnDone(rslt); + + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("GetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHCapabilitiesCreateInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const CMPIInstance * inst) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("CreateInstance() called, ctx %p, rslt %p, op %p, inst %p", ctx, rslt, op, inst)); + _CMPI_TRACE(1,("CreateInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +// ---------------------------------------------------------------------------- + +#ifdef CMPI_VER_100 +#define SSHCapabilitiesSetInstance SSHCapabilitiesModifyInstance +#endif + +static CMPIStatus SSHCapabilitiesSetInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const CMPIInstance * inst, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("SetInstance() called, ctx %p, rslt %p, op %p, inst %p, properties %p", ctx, rslt, op, inst, properties)); + _CMPI_TRACE(1,("SetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + +// ---------------------------------------------------------------------------- + + +/* DeleteInstance() - delete/remove the specified instance. */ +static CMPIStatus SSHCapabilitiesDeleteInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("DeleteInstance() called, ctx %p, rslt %p, op %p", ctx, rslt, op)); + _CMPI_TRACE(1,("DeleteInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHCapabilitiesExecQuery( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char * query, + const char * lang) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("ExecQuery() called, ctx %p, rslt %p, op %p, query %s, lang %s", ctx, rslt, op, query, lang)); + _CMPI_TRACE(1,("ExecQuery() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + + +/***************************************************************************/ + + +CMInstanceMIStub( SSHCapabilities, Linux_SSHCapabilities, + _BROKER, CMNoHook); + Added: cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c (rev 0) +++ cmpiprofiles/sblim-cmpi-ssh_service_profile/trunk/src/SSHElementCapabilitiesProvider.c 2008-07-03 19:44:34 UTC (rev 703) @@ -0,0 +1,406 @@ +/* + * (C) Copyright Novell, Inc. 2008 + * + * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + * + * You can obtain a current copy of the Eclipse Public License from + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * Author: Bart Whiteley <bwhiteley suse.de> + * + */ + +#include <stdio.h> +#include <stdlib.h> // for free +#include <string.h> // for strdup +#include <strings.h> // for strcasecmp +#include <stdarg.h> + +#include <cmpi/cmpidt.h> +#include <cmpi/cmpift.h> +#include <cmpi/cmpimacs.h> + +#include <cmpiutil/base.h> +#include <cmpiutil/exec.h> +#include <cmpiutil/cmpiSimpleAssoc.h> + +#include "SSHServiceProvider.h" + +/* A simple stderr logging/tracing facility. */ +#ifndef _CMPI_TRACE +#define _CMPI_TRACE(tracelevel,args) _logstderr args +static void _logstderr(char *fmt,...) +{ + va_list ap; + va_start(ap,fmt); + vfprintf(stderr,fmt,ap); + va_end(ap); + fprintf(stderr,"\n"); +} +#endif + + +// ---------------------------------------------------------------------------- +// CMPI INSTANCE PROVIDER FUNCTIONS +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHElementCapabilitiesCleanup( + CMPIInstanceMI * self, + const CMPIContext * ctx, + CMPIBoolean terminating) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + return st; +} + + +static CMPIStatus SSHElementCapabilitiesAssociationCleanup( + CMPIAssociationMI * self, + const CMPIContext * ctx, + CMPIBoolean terminating) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + return st; +} + + +// ---------------------------------------------------------------------------- +// + +CMPIObjectPath* getSSHElementCapabilitiesInstanceName(CMPIStatus* status) +{ + CMPIObjectPath* cop = CMNewObjectPath(_BROKER, "root/cimv2", + "Linux_SSHElementCapabilities", status); + CMPIValue val; + val.ref = getSSHCapabilitiesInstanceName(status); + CMAddKey(cop, "Capabilities", &val, CMPI_ref); + val.ref = getSSHServiceInstanceName(status); + CMAddKey(cop, "ManagedElement", &val, CMPI_ref); + return cop; +} + +static CMPIInstance* getSSHElementCapabilitiesInstance(CMPIStatus* status) +{ + CMPIObjectPath* cop = getSSHElementCapabilitiesInstanceName(status); + CMPIInstance* inst = CMNewInstance(_BROKER, cop, status); + updateInstFromPath(inst, cop, status); + CMPIValue val; + CMPIArray* ra = CMNewArray(_BROKER, 2, CMPI_uint16, status); + val.uint16 = 2; + CMSetArrayElementAt(ra, 0, &val, CMPI_uint16); + val.uint16 = 3; + CMSetArrayElementAt(ra, 1, &val, CMPI_uint16); + val.array = ra; + CMSetProperty(inst, "Characteristics", &val, CMPI_uint16A); + return inst; +} + + +static CMPIStatus SSHElementCapabilitiesEnumInstanceNames( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op) +{ + _CMPI_TRACE(1,("EnumInstanceNames() called, ctx %p, result %p, reference %p", ctx, rslt, op)); + CMPIStatus status = {CMPI_RC_OK, NULL}; + + + CMReturnObjectPath(rslt, getSSHElementCapabilitiesInstanceName(&status)); + CMReturnDone(rslt); + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("EnumInstanceNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + + + +static CMPIStatus SSHElementCapabilitiesEnumInstances( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_OK, NULL}; + + _CMPI_TRACE(1,("EnumInstances() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); + + CMReturnInstance(rslt, getSSHElementCapabilitiesInstance(&status)); + CMReturnDone(rslt); + + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("EnumInstances() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHElementCapabilitiesGetInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_OK, NULL}; /* Return status of CIM operations */ + + _CMPI_TRACE(1,("GetInstance() called, ctx %p, rslt %p, op %p, properties %p", ctx, rslt, op, properties)); + + CMReturnInstance(rslt, getSSHElementCapabilitiesInstance(&status)); + CMReturnDone(rslt); + + status.rc = CMPI_RC_OK; + status.msg = NULL; + + _CMPI_TRACE(1,("GetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHElementCapabilitiesCreateInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const CMPIInstance * inst) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("CreateInstance() called, ctx %p, rslt %p, op %p, inst %p", ctx, rslt, op, inst)); + _CMPI_TRACE(1,("CreateInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +// ---------------------------------------------------------------------------- + +#ifdef CMPI_VER_100 +#define SSHElementCapabilitiesSetInstance SSHElementCapabilitiesModifyInstance +#endif + +static CMPIStatus SSHElementCapabilitiesSetInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const CMPIInstance * inst, + const char ** properties) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("SetInstance() called, ctx %p, rslt %p, op %p, inst %p, properties %p", ctx, rslt, op, inst, properties)); + _CMPI_TRACE(1,("SetInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + +// ---------------------------------------------------------------------------- + + +/* DeleteInstance() - delete/remove the specified instance. */ +static CMPIStatus SSHElementCapabilitiesDeleteInstance( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("DeleteInstance() called, ctx %p, rslt %p, op %p", ctx, rslt, op)); + _CMPI_TRACE(1,("DeleteInstance() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + +// ---------------------------------------------------------------------------- + + +static CMPIStatus SSHElementCapabilitiesExecQuery( + CMPIInstanceMI * self, + const CMPIContext * ctx, + const CMPIResult * rslt, + const CMPIObjectPath * op, + const char * query, + const char * lang) +{ + CMPIStatus status = {CMPI_RC_ERR_NOT_SUPPORTED, NULL}; + + _CMPI_TRACE(1,("ExecQuery() called, ctx %p, rslt %p, op %p, query %s, lang %s", ctx, rslt, op, query, lang)); + _CMPI_TRACE(1,("ExecQuery() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + + +// associatorMIFT +// + +static CMPIStatus doRefs(cmpiutilSimpleAssocCtx ctx, + CMPIAssociationMI* self, + const CMPIBroker *broker, + const CMPIContext* context, + const CMPIResult* rslt, + const CMPIObjectPath* op, + const char *assocClass, + const char *resultClass, + const char *role, + const char *resultRole, + const char** properties) +{ + _CMPI_TRACE(1,("doRefs() called, ctx %p, rslt %p, op %p, assocClass %s, resultClass %s, role %s, resultRole %s, properties %p", ctx, rslt, op, assocClass, resultClass, role, resultRole, properties)); + CMPIStatus status = {CMPI_RC_OK, NULL}; + if (assocClass && strcasecmp(assocClass, + "Linux_SSHElementCapabilities") != 0) + { + _CMPI_TRACE(1,("one")); + return status; + } + + CMPIString* cmstr = CMGetClassName(op, &status); + char* cname = CMGetCharsPtr(cmstr, &status); + if (strcasecmp("Linux_SSHCapabilities", cname) == 0) + { + if (role && *role && strcasecmp(role, "Capabilities") != 0) + { + _CMPI_TRACE(1,("two")); + return status; + } + if (resultRole && *resultRole && + strcasecmp(resultRole, "ManagedElement") != 0) + { + _CMPI_TRACE(1,("three")); + return status; + } + if (resultClass && *resultClass && + strcasecmp(resultClass, "Linux_SSHProtocolService") != 0) + { + _CMPI_TRACE(1,("four")); + return status; + } + } + if (strcasecmp("Linux_SSHProtocolService", cname) == 0) + { + if (role && *role && strcasecmp(role, "ManagedElement") != 0) + { + _CMPI_TRACE(1,("five")); + return status; + } + if (resultRole && *resultRole && + strcasecmp(resultRole, "Capabilities") != 0) + { + _CMPI_TRACE(1,("six")); + return status; + } + if (resultClass && *resultClass && + strcasecmp(resultClass, "Linux_SSHCapabilities") != 0) + { + _CMPI_TRACE(1,("seven")); + return status; + } + } + cmpiutilSimpleAssocResults(ctx, + getSSHElementCapabilitiesInstance(&status), &status); + + _CMPI_TRACE(1,("doRefs() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + + +CMPIStatus SSHElementCapabilitiesAssociatorNames( + CMPIAssociationMI* self, + const CMPIContext* ctx, + const CMPIResult* rslt, + const CMPIObjectPath* op, + const char* assocClass, + const char* resultClass, + const char* role, + const char* resultRole) +{ + _CMPI_TRACE(1,("associatorNames() called, ctx %p, rslt %p, op %p, assocClass %s, resultClass %s, role %s, resultRole %s", ctx, rslt, op, assocClass, resultClass, role, resultRole)); + CMPIStatus status = cmpiutilSimpleAssociatorNames(doRefs, + self, _BROKER, ctx, rslt, op, assocClass, resultClass, role, + resultRole); + + _CMPI_TRACE(1,("associatorNames() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + +/***************************************************************************/ +CMPIStatus SSHElementCapabilitiesAssociators( + CMPIAssociationMI* self, + const CMPIContext* ctx, + const CMPIResult* rslt, + const CMPIObjectPath* op, + const char* assocClass, + const char* resultClass, + const char* role, + const char* resultRole, + const char** properties) +{ + _CMPI_TRACE(1,("associators() called, ctx %p, rslt %p, op %p, assocClass %s, resultClass %s, role %s, resultRole %s", ctx, rslt, op, assocClass, resultClass, role, resultRole)); + CMPIStatus status = cmpiutilSimpleAssociators(doRefs, self, _BROKER, + ctx, rslt, op, assocClass, resultClass, role, resultRole, + properties); + + _CMPI_TRACE(1,("associators() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); + return status; +} + +/***************************************************************************/ +CMPIStatus SSHElementCapabilitiesReferenceNames( + CMPIAssociationMI* self, + const CMPIContext* ctx, + const CMPIResult* rslt, + const CMPIObjectPath* op, + const char* resultClass, + const char* role) +{ + _CMP... [truncated message content] |
From: <np...@us...> - 2008-07-03 19:04:31
|
Revision: 702 http://omc.svn.sourceforge.net/omc/?rev=702&view=rev Author: npaxton Date: 2008-07-03 12:03:38 -0700 (Thu, 03 Jul 2008) Log Message: ----------- refactor to new lib name: sblim-cmpiutil; some additional debug output Modified Paths: -------------- sblim-cmpi-base-plus/trunk/mof/Makefile.am sblim-cmpi-base-plus/trunk/src/providers/operating-system/LinuxInstalledOS.c sblim-cmpi-base-plus/trunk/src/providers/operating-system/Makefile.am sblim-cmpi-base-plus/trunk/src/providers/time-service/Makefile.am sblim-cmpi-base-plus/trunk/src/providers/time-service/hostedTimeService.c sblim-cmpi-base-plus/trunk/src/providers/time-service/systemTimeService.c sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAccessBySAP.c sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAvailableToElement.c sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceTimeZoneSettingData.c Modified: sblim-cmpi-base-plus/trunk/mof/Makefile.am =================================================================== --- sblim-cmpi-base-plus/trunk/mof/Makefile.am 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/mof/Makefile.am 2008-07-03 19:03:38 UTC (rev 702) @@ -1,7 +1,6 @@ EXTRA_DIST = \ Linux_BasePlus.registration \ - linux-file-system-elements.mof \ - linux-initd.mof \ + Linux_BasePlusFile.registration \ linux-installed-os.mof \ linux-logical-file.mof \ linux-time-service.mof Modified: sblim-cmpi-base-plus/trunk/src/providers/operating-system/LinuxInstalledOS.c =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/operating-system/LinuxInstalledOS.c 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/operating-system/LinuxInstalledOS.c 2008-07-03 19:03:38 UTC (rev 702) @@ -42,6 +42,8 @@ /* NULL terminated list of key property names for this class */ static const char* _classKeys[] = { "GroupComponent", "PartComponent", NULL }; +#define DEBUG + #ifdef DEBUG #define DEBUGOUT(fmt, args...) printf(fmt,## args) #else @@ -77,9 +79,9 @@ CMPIStatus status = {CMPI_RC_OK, NULL}; char * ns = (char *) CMGetCharPtr(CMGetNameSpace(cop, NULL)); - DEBUGOUT("doReferences called\n"); + DEBUGOUT("Linux_InstalledOS::doReferences called\n"); - if (strcasecmp(assocClass, "Linux_InstalledOS") == 0) + if (!(assocClass && *assocClass) || (strcasecmp(assocClass, "Linux_InstalledOS") == 0)) { CMPIObjectPath *osOp, *csOp; char *objsClassName = (char *) CMGetCharPtr(CMGetClassName(cop, NULL)); @@ -128,7 +130,7 @@ } else { - DEBUGOUT("!!! Object type unknown: %s\n", objsClassName); + //DEBUGOUT("!!! Object type unknown: %s\n", objsClassName); return status; } @@ -136,7 +138,7 @@ "Linux_InstalledOS", _classKeys, properties, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(instance)) { - DEBUGOUT("doReferences(): cmpiutilNewInstance() failed - %s\n", + DEBUGOUT("Linux_InstalledOS::doReferences(): cmpiutilNewInstance() failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -144,7 +146,7 @@ osOp = cmpiutilCreateOSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(osOp)) { - DEBUGOUT("doReferences(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::doReferences(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -152,7 +154,7 @@ csOp = cmpiutilCreateCSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(csOp)) { - DEBUGOUT("doReferences(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::doReferences(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -161,7 +163,7 @@ CMSetProperty(instance, "PartComponent", (CMPIValue*)&osOp, CMPI_ref); cmpiutilSimpleAssocResults(ctx, instance, &status); } - DEBUGOUT("Leaving doReferences\n"); + DEBUGOUT("Linux_InstalledOS::Leaving doReferences\n"); return status; } @@ -190,12 +192,12 @@ CMPIObjectPath *osOp, *csOp, *assocOp; char *ns = (char *) CMGetCharPtr(CMGetNameSpace(cop, NULL)); - DEBUGOUT("EnumInstanceNames() called\n"); + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames() called\n"); osOp = cmpiutilCreateOSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(osOp)) { - DEBUGOUT("EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -203,7 +205,7 @@ csOp = cmpiutilCreateCSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(csOp)) { - DEBUGOUT("EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -212,14 +214,14 @@ "GroupComponent", "PartComponent", csOp, osOp, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(assocOp)) { - DEBUGOUT("EnumInstanceNames(): cmpiutilCreateAssociationPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames(): cmpiutilCreateAssociationPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } CMReturnObjectPath(results, assocOp); CMReturnDone(results); - DEBUGOUT("Leaving EnumInstanceNames(): %s\n", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving EnumInstanceNames(): %s\n", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -245,19 +247,19 @@ CMPIObjectPath *osOp, *csOp; CMPIInstance *instance; - DEBUGOUT("EnumInstances() called"); + DEBUGOUT("Linux_InstalledOS::EnumInstances() called"); instance = cmpiutilNewInstance(_broker, ns, "Linux_InstalledOS", _classKeys, properties, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(instance)) { - DEBUGOUT("EnumInstances(): cmpiutilNewInstance() failed - %s\n", CMGetCharPtr(status.msg)); + DEBUGOUT("Linux_InstalledOS::EnumInstances(): cmpiutilNewInstance() failed - %s\n", CMGetCharPtr(status.msg)); return status; } osOp = cmpiutilCreateOSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(osOp)) { - DEBUGOUT("EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -265,7 +267,7 @@ csOp = cmpiutilCreateCSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(csOp)) { - DEBUGOUT("EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -274,7 +276,7 @@ CMSetProperty(instance, "PartComponent", (CMPIValue*)&osOp, CMPI_ref); CMReturnInstance(results, instance); CMReturnDone(results); - DEBUGOUT("Leaving EnumInstanceNames(): %s\n", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving EnumInstanceNames(): %s\n", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -301,25 +303,25 @@ CMPIObjectPath *osOp, *csOp; CMPIInstance *instance; - DEBUGOUT("GetInstance() called"); + DEBUGOUT("Linux_InstalledOS::GetInstance() called"); grpComp = CMGetKey(cop, "GroupComponent", &status); if (status.rc != CMPI_RC_OK || CMIsNullValue(grpComp)) { - DEBUGOUT("GetInstance(): CMGetKey(\"GroupComponent\") failed - %s\n", CMGetCharPtr(status.msg)); + DEBUGOUT("Linux_InstalledOS::GetInstance(): CMGetKey(\"GroupComponent\") failed - %s\n", CMGetCharPtr(status.msg)); CMSetStatusWithChars(_broker, &status, CMPI_RC_ERR_NO_SUCH_PROPERTY, "GroupComponent missing"); return status; } if (grpComp.type != CMPI_ref) { - DEBUGOUT("GetInstance(): Invalid 'GroupComponent' key property type\n"); + DEBUGOUT("Linux_InstalledOS::GetInstance(): Invalid 'GroupComponent' key property type\n"); CMSetStatusWithChars(_broker, &status, CMPI_RC_ERR_INVALID_PARAMETER, "GroupComponent key invalid"); return status; } partComp = CMGetKey(cop, "PartComponent", &status); if (status.rc != CMPI_RC_OK || CMIsNullValue(partComp)) { - DEBUGOUT("GetInstance(): CMGetKey(\"PartComponent\") failed - %s\n", CMGetCharPtr(status.msg)); + DEBUGOUT("Linux_InstalledOS::GetInstance(): CMGetKey(\"PartComponent\") failed - %s\n", CMGetCharPtr(status.msg)); CMSetStatusWithChars(_broker, &status, CMPI_RC_ERR_NO_SUCH_PROPERTY, "PartComponent missing"); return status; } @@ -328,7 +330,7 @@ instance = cmpiutilNewInstance(_broker, ns, "Linux_InstalledOS", _classKeys, properties, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(instance)) { - DEBUGOUT("GetInstance(): cmpiutilNewInstance() failed - %s\n", CMGetCharPtr(status.msg)); + DEBUGOUT("Linux_InstalledOS::GetInstance(): cmpiutilNewInstance() failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -342,7 +344,7 @@ osOp = cmpiutilCreateOSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(osOp)) { - DEBUGOUT("EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -350,7 +352,7 @@ csOp = cmpiutilCreateCSObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(csOp)) { - DEBUGOUT("EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", + DEBUGOUT("Linux_InstalledOS::EnumInstanceNames(): cmpiutilCreateOSObjectPath failed - %s\n", CMGetCharPtr(status.msg)); return status; } @@ -358,7 +360,7 @@ CMSetProperty(instance, "GroupComponent", (CMPIValue*)&csOp, CMPI_ref); CMSetProperty(instance, "PartComponent", (CMPIValue*)&osOp, CMPI_ref); CMReturnInstance(results, instance); - DEBUGOUT("Leaving GetInstance(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving GetInstance(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -461,10 +463,10 @@ { CMPIStatus status = {CMPI_RC_OK, NULL}; - DEBUGOUT("Cleanup() called"); + DEBUGOUT("Linux_InstalledOS::Cleanup() called"); - DEBUGOUT("Leaving Cleanup(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving Cleanup(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -476,10 +478,10 @@ static void Init( CMPIInstanceMI* self) { - DEBUGOUT("Initialize() called"); + DEBUGOUT("Linux_InstalledOS::Initialize() called"); - DEBUGOUT("Leaving Initialize()\n"); + DEBUGOUT("Linux_InstalledOS::Leaving Initialize()\n"); } /****************************************************************************** @@ -494,10 +496,10 @@ AssocInit( CMPIAssociationMI* self) { - DEBUGOUT("AssocInit() called"); + DEBUGOUT("Linux_InstalledOS::AssocInit() called"); - DEBUGOUT("Leaving AssocInit()\n"); + DEBUGOUT("Linux_InstalledOS::Leaving AssocInit()\n"); } @@ -516,11 +518,11 @@ { CMPIStatus status = {CMPI_RC_OK, NULL}; - DEBUGOUT("AssociationCleanup() called"); + DEBUGOUT("Linux_InstalledOS::AssociationCleanup() called"); /* do work here if necessary */ - DEBUGOUT("Leaving AssociationCleanup(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving AssociationCleanup(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -551,13 +553,13 @@ { CMPIStatus status = {CMPI_RC_OK, NULL}; - DEBUGOUT("Associators() called"); + DEBUGOUT("Linux_InstalledOS::Associators() called"); status = cmpiutilSimpleAssociators(doReferences, self, _broker, context, results, cop, assocClass, resultClass, role, resultRole, properties); - DEBUGOUT("Leaving Associatiors(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving Associatiors(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -586,13 +588,13 @@ { CMPIStatus status = {CMPI_RC_OK, NULL}; - DEBUGOUT("AssociatorNames() called"); + DEBUGOUT("Linux_InstalledOS::AssociatorNames() called"); status = cmpiutilSimpleAssociatorNames(doReferences, self, _broker, context, results, cop, assocClass, resultClass, role, resultRole); - DEBUGOUT("Leaving AssociatiorNames(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving AssociatiorNames(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -617,12 +619,12 @@ { CMPIStatus status = {CMPI_RC_OK, NULL}; - DEBUGOUT("References() called"); + DEBUGOUT("Linux_InstalledOS::References() called"); status = cmpiutilSimpleReferences( doReferences, self, _broker, context, results, cop, resultClass, role, properties); - DEBUGOUT("Leaving References(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving References(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } @@ -647,12 +649,12 @@ { CMPIStatus status = {CMPI_RC_OK, NULL}; - DEBUGOUT("ReferenceNames() called"); + DEBUGOUT("Linux_InstalledOS::ReferenceNames() called"); status = cmpiutilSimpleReferenceNames( doReferences, self, _broker, context, results, cop, resultClass, role); - DEBUGOUT("Leaving ReferenceNames(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); + DEBUGOUT("Linux_InstalledOS::Leaving ReferenceNames(): %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed"); return status; } Modified: sblim-cmpi-base-plus/trunk/src/providers/operating-system/Makefile.am =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/operating-system/Makefile.am 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/operating-system/Makefile.am 2008-07-03 19:03:38 UTC (rev 702) @@ -10,5 +10,5 @@ libcmpi_InstalledLinuxOS_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 Modified: sblim-cmpi-base-plus/trunk/src/providers/time-service/Makefile.am =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/time-service/Makefile.am 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/time-service/Makefile.am 2008-07-03 19:03:38 UTC (rev 702) @@ -16,7 +16,7 @@ libcmpi_systemTimeService_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 @@ -25,7 +25,7 @@ libcmpi_remoteTimeServicePort_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 @@ -34,7 +34,7 @@ libcmpi_timeZoneSettingData_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 @@ -43,7 +43,7 @@ libcmpi_hostedTimeService_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 @@ -52,7 +52,7 @@ libcmpi_timeServiceTimeZoneSettingData_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 @@ -61,7 +61,7 @@ libcmpi_timeServiceAccessBySAP_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 @@ -70,6 +70,6 @@ libcmpi_timeServiceAvailableToElement_la_LDFLAGS = \ -lpthread \ - -lsblim_cmpiutil \ + -lsblim-cmpiutil \ -version-info 1 Modified: sblim-cmpi-base-plus/trunk/src/providers/time-service/hostedTimeService.c =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/time-service/hostedTimeService.c 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/time-service/hostedTimeService.c 2008-07-03 19:03:38 UTC (rev 702) @@ -512,7 +512,7 @@ CMPIStatus status = {CMPI_RC_OK, NULL}; char * ns = (char *) CMGetCharPtr(CMGetNameSpace(cop, NULL)); - if (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0) + if ((assocClass==NULL) || (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0)) { char *objClassName = (char *) CMGetCharPtr(CMGetClassName(cop, NULL)); if (objClassName) Modified: sblim-cmpi-base-plus/trunk/src/providers/time-service/systemTimeService.c =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/time-service/systemTimeService.c 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/time-service/systemTimeService.c 2008-07-03 19:03:38 UTC (rev 702) @@ -129,8 +129,8 @@ CMPIObjectPath *op = makeTimeServiceObjectPath(_broker, ns, &status); if ((status.rc != CMPI_RC_OK) || CMIsNullObject(op)) { + DEBUGOUT("EnumInstanceNames(): makeTimeServiceObjectPath() failed - %s\n", CMGetCharPtr(status.msg)); CMPIUTIL_SETSTATUS(_broker, &status, CMPI_RC_ERROR_SYSTEM, "Failed creating TimeService object path"); - DEBUGOUT("EnumInstanceNames(): makeTimeServiceObjectPath() failed - %s\n", CMGetCharPtr(status.msg)); return status; } CMReturnObjectPath(results, op); Modified: sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAccessBySAP.c =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAccessBySAP.c 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAccessBySAP.c 2008-07-03 19:03:38 UTC (rev 702) @@ -496,7 +496,7 @@ CMPIStatus status = {CMPI_RC_OK, NULL}; char * ns = (char *) CMGetCharPtr(CMGetNameSpace(cop, NULL)); - if (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0) + if ((assocClass==NULL) || (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0)) { char *objClassName = (char *) CMGetCharPtr(CMGetClassName(cop, NULL)); Modified: sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAvailableToElement.c =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAvailableToElement.c 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceAvailableToElement.c 2008-07-03 19:03:38 UTC (rev 702) @@ -508,7 +508,7 @@ CMPIStatus status = {CMPI_RC_OK, NULL}; char * ns = (char *) CMGetCharPtr(CMGetNameSpace(cop, NULL)); - if (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0) + if ((assocClass==NULL) || (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0)) { char *objClassName = (char *) CMGetCharPtr(CMGetClassName(cop, NULL)); if (objClassName) Modified: sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceTimeZoneSettingData.c =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceTimeZoneSettingData.c 2008-07-03 18:37:15 UTC (rev 701) +++ sblim-cmpi-base-plus/trunk/src/providers/time-service/timeServiceTimeZoneSettingData.c 2008-07-03 19:03:38 UTC (rev 702) @@ -508,7 +508,7 @@ CMPIStatus status = {CMPI_RC_OK, NULL}; char * ns = (char *) CMGetCharPtr(CMGetNameSpace(cop, NULL)); - if (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0) + if ((assocClass==NULL) || (strcasecmp(assocClass, ASSOC_CLASSNAME) == 0)) { char *objClassName = (char *) CMGetCharPtr(CMGetClassName(cop, NULL)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-07-03 18:37:37
|
Revision: 701 http://omc.svn.sourceforge.net/omc/?rev=701&view=rev Author: npaxton Date: 2008-07-03 11:37:15 -0700 (Thu, 03 Jul 2008) Log Message: ----------- added some checks, removed some TRACEs Modified Paths: -------------- sblim-cmpi-base-plus/trunk/src/providers/logical-file/Linux_LinuxDirectoryContainsFile_Provider.cpp Modified: sblim-cmpi-base-plus/trunk/src/providers/logical-file/Linux_LinuxDirectoryContainsFile_Provider.cpp =================================================================== --- sblim-cmpi-base-plus/trunk/src/providers/logical-file/Linux_LinuxDirectoryContainsFile_Provider.cpp 2008-07-03 18:06:59 UTC (rev 700) +++ sblim-cmpi-base-plus/trunk/src/providers/logical-file/Linux_LinuxDirectoryContainsFile_Provider.cpp 2008-07-03 18:37:15 UTC (rev 701) @@ -38,6 +38,7 @@ #include <sys/types.h> #include <dirent.h> + CIMPLE_NAMESPACE_BEGIN #if 0 @@ -106,61 +107,53 @@ Enum_Associator_Names_Handler<Instance>* handler) { if (eqi(role, "PartComponent") - || eqi(result_role, "GroupComponent") - || (role.empty() && result_role.empty())) + || eqi(result_role, "GroupComponent") + || (role.empty() && result_role.empty())) { - TRACE; - CIM_LogicalFile* clf = cast<CIM_LogicalFile*>(instance); - char* parentPath = cmpiutil_dirname(clf->Name.value.c_str()); - CIM_LogicalFile* parentc = getFile(parentPath); - free(parentPath); - Linux_LinuxDirectory* parent = cast<Linux_LinuxDirectory*>(parentc); - handler->handle(parent); + CIM_LogicalFile* clf = cast<CIM_LogicalFile*>(instance); + char* parentPath = cmpiutil_dirname(clf->Name.value.c_str()); + CIM_LogicalFile* parentc = getFile(parentPath); + free(parentPath); + Linux_LinuxDirectory* parent = cast<Linux_LinuxDirectory*>(parentc); + handler->handle(parent); } if (eqi(role, "GroupComponent") - || eqi(result_role, "PartComponent") - || (role.empty() && result_role.empty())) + || eqi(result_role, "PartComponent") + || (role.empty() && result_role.empty())) { - TRACE; - CIM_LogicalFile* dirc = cast<CIM_LogicalFile*>(instance); - TRACE; - dirc = getFile(dirc->Name.value.c_str()); - Ref<Instance> dirc_d(dirc); - TRACE; - if (eqi(dirc->CreationClassName.value, "Linux_LinuxDirectory")) - { - struct dirent* pDent; - DIR* pDir; - pDir = opendir(dirc->Name.value.c_str()); - if (pDir != 0) - { - String prefix = dirc->Name.value; - TRACE; - if (prefix[prefix.size()-1] != '/') - { - TRACE; - prefix.append('/'); - } - TRACE; - for (pDent = readdir(pDir); pDent != 0; pDent = readdir(pDir)) - { - String curName = pDent->d_name; - if (curName.equal(".") or curName.equal("..")) - { - continue; - } - String fullName = prefix; - fullName.append(curName); - CIM_LogicalFile* fileInDir = getFile(fullName.c_str()); - if (fileInDir) - { - TRACE; - handler->handle(fileInDir); - } - } - } - closedir(pDir); - } + CIM_LogicalFile* dirc = cast<CIM_LogicalFile*>(instance); + dirc = getFile(dirc->Name.value.c_str()); + Ref<Instance> dirc_d(dirc); + if (eqi(dirc->CreationClassName.value, "Linux_LinuxDirectory")) + { + struct dirent* pDent; + DIR* pDir; + pDir = opendir(dirc->Name.value.c_str()); + if (pDir != 0) + { + String prefix = dirc->Name.value; + if (prefix[prefix.size()-1] != '/') + { + prefix.append('/'); + } + for (pDent = readdir(pDir); pDent != 0; pDent = readdir(pDir)) + { + String curName = pDent->d_name; + if (curName.equal(".") or curName.equal("..")) + { + continue; + } + String fullName = prefix; + fullName.append(curName); + CIM_LogicalFile* fileInDir = getFile(fullName.c_str()); + if (fileInDir) + { + handler->handle(fileInDir); + } + } + } + closedir(pDir); + } } return ENUM_ASSOCIATOR_NAMES_OK; } @@ -171,66 +164,72 @@ const String& role, Enum_References_Handler<Linux_LinuxDirectoryContainsFile>* handler) { - TRACE; if (eqi(role, "PartComponent") || role.empty()) { - TRACE; - CIM_LogicalFile* clf = cast<CIM_LogicalFile*>(instance); - char* parentPath = cmpiutil_dirname(clf->Name.value.c_str()); - CIM_LogicalFile* parentc = getFile(parentPath); - free(parentPath); - Linux_LinuxDirectory* parent = cast<Linux_LinuxDirectory*>(parentc); - Linux_LinuxDirectoryContainsFile* assoc = Linux_LinuxDirectoryContainsFile::create(); - assoc->PartComponent = clf->clone(); - assoc->GroupComponent = parent; - handler->handle(assoc); + CIM_LogicalFile* clf = cast<CIM_LogicalFile*>(instance); + if (clf) + { + char* parentPath = cmpiutil_dirname(clf->Name.value.c_str()); + CIM_LogicalFile* parentc = getFile(parentPath); + free(parentPath); + Linux_LinuxDirectory* parent = cast<Linux_LinuxDirectory*>(parentc); + if (parent) + { + Linux_LinuxDirectoryContainsFile* assoc = Linux_LinuxDirectoryContainsFile::create(); + assoc->PartComponent = clf->clone(); + assoc->GroupComponent = parent; + handler->handle(assoc); + } + } } if (eqi(role, "GroupComponent") || role.empty()) { - TRACE; - CIM_LogicalFile* dirc = cast<CIM_LogicalFile*>(instance); - TRACE; - dirc = getFile(dirc->Name.value.c_str()); - Ref<Instance> dirc_d(dirc); - TRACE; - if (eqi(dirc->CreationClassName.value, "Linux_LinuxDirectory")) - { - struct dirent* pDent; - DIR* pDir; - pDir = opendir(dirc->Name.value.c_str()); - if (pDir != 0) - { - String prefix = dirc->Name.value; - TRACE; - if (prefix[prefix.size()-1] != '/') - { - TRACE; - prefix.append('/'); - } - TRACE; - for (pDent = readdir(pDir); pDent != 0; pDent = readdir(pDir)) - { - String curName = pDent->d_name; - if (curName.equal(".") or curName.equal("..")) - { - continue; - } - String fullName = prefix; - fullName.append(curName); - CIM_LogicalFile* fileInDir = getFile(fullName.c_str()); - if (fileInDir) - { - TRACE; - Linux_LinuxDirectoryContainsFile* assoc = Linux_LinuxDirectoryContainsFile::create(); - Linux_LinuxDirectory* old = cast<Linux_LinuxDirectory*>(dirc); - assoc->GroupComponent = old->clone(); - assoc->PartComponent = fileInDir; - handler->handle(assoc); - } - } - } - closedir(pDir); - } + printf("Into GroupComponent\n"); + CIM_LogicalFile* dirc = cast<CIM_LogicalFile*>(instance); + if (dirc) + { + dirc = getFile(dirc->Name.value.c_str()); + printf("dirc: %s\n", dirc->Name.value.c_str()); + Ref<Instance> dirc_d(dirc); + printf("dirc->CreationClassName: %s\n", dirc->CreationClassName.value.c_str()); + if (eqi(dirc->CreationClassName.value, "Linux_LinuxDirectory")) + { + struct dirent* pDent; + DIR* pDir; + pDir = opendir(dirc->Name.value.c_str()); + if (pDir != 0) + { + String prefix = dirc->Name.value; + if (prefix[prefix.size()-1] != '/') + { + prefix.append('/'); + } + for (pDent = readdir(pDir); pDent != 0; pDent = readdir(pDir)) + { + String curName = pDent->d_name; + if (curName.equal(".") or curName.equal("..")) + { + continue; + } + String fullName = prefix; + fullName.append(curName); + CIM_LogicalFile* fileInDir = getFile(fullName.c_str()); + if (fileInDir) + { + Linux_LinuxDirectoryContainsFile* assoc = Linux_LinuxDirectoryContainsFile::create(); + Linux_LinuxDirectory* old = cast<Linux_LinuxDirectory*>(dirc); + if (old) + { + assoc->GroupComponent = old->clone(); + assoc->PartComponent = fileInDir; + handler->handle(assoc); + } + } + } + } + closedir(pDir); + } + } } return ENUM_REFERENCES_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-07-03 18:06:50
|
Revision: 700 http://omc.svn.sourceforge.net/omc/?rev=700&view=rev Author: npaxton Date: 2008-07-03 11:06:59 -0700 (Thu, 03 Jul 2008) Log Message: ----------- change library name from sblim_cmpiutil to sblim-cmpiutil - to resolve rpm build error Modified Paths: -------------- sblim-cmpiutil/trunk/src/lib/cmpiutil/Makefile.am Modified: sblim-cmpiutil/trunk/src/lib/cmpiutil/Makefile.am =================================================================== --- sblim-cmpiutil/trunk/src/lib/cmpiutil/Makefile.am 2008-07-03 17:04:10 UTC (rev 699) +++ sblim-cmpiutil/trunk/src/lib/cmpiutil/Makefile.am 2008-07-03 18:06:59 UTC (rev 700) @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = gnu lib_LTLIBRARIES = \ - libsblim_cmpiutil.la + libsblim-cmpiutil.la INCLUDES = -I$(top_srcdir)/src/include This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-07-03 17:04:06
|
Revision: 699 http://omc.svn.sourceforge.net/omc/?rev=699&view=rev Author: npaxton Date: 2008-07-03 10:04:10 -0700 (Thu, 03 Jul 2008) Log Message: ----------- some fixes, change 'make dist' tarball output from gz to bz2 Modified Paths: -------------- sblim-cmpiutil/trunk/configure.ac sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiSimpleAssoc.c sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiTimeServiceUtils.c sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiUtils.c sblim-cmpiutil/trunk/src/lib/cmpiutil/fileTools.c Modified: sblim-cmpiutil/trunk/configure.ac =================================================================== --- sblim-cmpiutil/trunk/configure.ac 2008-07-03 03:14:03 UTC (rev 698) +++ sblim-cmpiutil/trunk/configure.ac 2008-07-03 17:04:10 UTC (rev 699) @@ -3,7 +3,7 @@ AC_PREREQ(2.57) AC_INIT(sblim-cmpiutil, 1.0.1) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([dist-bzip2 tar-ustar]) AC_CONFIG_SRCDIR([src]) AC_CONFIG_HEADER([config.h]) AC_PROG_LIBTOOL Modified: sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiSimpleAssoc.c =================================================================== --- sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiSimpleAssoc.c 2008-07-03 03:14:03 UTC (rev 698) +++ sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiSimpleAssoc.c 2008-07-03 17:04:10 UTC (rev 699) @@ -80,9 +80,9 @@ if (key.type == CMPI_ref) { DEBUGOUT(" key type == REF... comparing object paths\n"); - DEBUGOUT(" cop1: %s\n", + DEBUGOUT(" orig cop: %s\n", CMGetCharPtr(CMObjectPathToString(handler->origCop, NULL))); - DEBUGOUT(" cop2: %s\n", + DEBUGOUT(" key cop: %s\n", CMGetCharPtr(CMObjectPathToString(key.value.ref, NULL))); if (!cmpiutilAreObjectPathsSame( handler->origCop, key.value.ref, @@ -99,6 +99,10 @@ CMReturnInstance(handler->results, inst); break; } + else + { + DEBUGOUT(" objectPaths same, not processing this one\n"); + } } } } Modified: sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiTimeServiceUtils.c =================================================================== --- sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiTimeServiceUtils.c 2008-07-03 03:14:03 UTC (rev 698) +++ sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiTimeServiceUtils.c 2008-07-03 17:04:10 UTC (rev 699) @@ -79,8 +79,6 @@ const char *ns, CMPIStatus *pStatus) { - DEBUGOUT("EnumInstanceNames() called\n"); - CMPIObjectPath *op = CMNewObjectPath(broker, ns, "Linux_SystemTimeService", pStatus); if (!CMIsNullObject(op) && (pStatus->rc == CMPI_RC_OK)) { @@ -104,6 +102,7 @@ (CMPIValue *)"cmpiutil:timeservice", CMPI_chars); } + DEBUGOUT("makeTimeServiceObjectPath returning: %s\n", (char *)CMGetCharPtr(CMObjectPathToString(op, NULL))); return op; } Modified: sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiUtils.c =================================================================== --- sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiUtils.c 2008-07-03 03:14:03 UTC (rev 698) +++ sblim-cmpiutil/trunk/src/lib/cmpiutil/cmpiUtils.c 2008-07-03 17:04:10 UTC (rev 699) @@ -40,7 +40,7 @@ #include <cmpift.h> #include <cmpimacs.h> -//#define LOCAL_DEBUG +#define LOCAL_DEBUG #ifdef LOCAL_DEBUG #define DEBUGOUT(fmt, args...) printf(fmt,## args) @@ -138,7 +138,10 @@ CMAddKey(objectpath, "CSCreationClassName", (CMPIValue*)cmpiutilGetComputerSystemClassName(), CMPI_chars); CMAddKey(objectpath, "CSName", (CMPIValue*)hname, CMPI_chars); CMAddKey(objectpath, "CreationClassName", (CMPIValue*)cmpiutilGetOperatingSystemClassName(), CMPI_chars); - CMAddKey(objectpath, "Name", (CMPIValue*)"Linux", CMPI_chars); + //CMAddKey(objectpath, "Name", (CMPIValue*)"Linux", CMPI_chars); + // NWP: Changing to same value as CSName - as this is now using the Sblim-cmpi-base standards, + // and we're creating a path to the sblim-cmpi-base/OperatingSystem + CMAddKey(objectpath, "Name", (CMPIValue*)hname, CMPI_chars); } return objectpath; @@ -483,22 +486,34 @@ return 0; // FALSE } - /* + DEBUGOUT("Comparing Object Paths:\n"); DEBUGOUT(" cop1: %s\n", CMGetCharPtr(CMObjectPathToString(cop1, NULL))); DEBUGOUT(" cop2: %s\n", CMGetCharPtr(CMObjectPathToString(cop2, NULL))); - DEBUGOUT(" hn1: %s\n", CMGetCharPtr(CMGetHostname(cop1, NULL))); - DEBUGOUT(" hn1: %s\n", CMGetCharPtr(CMGetHostname(cop2, NULL))); - DEBUGOUT(" ns1: %s\n", CMGetCharPtr(CMGetNameSpace(cop1, NULL))); - DEBUGOUT(" ns1: %s\n", CMGetCharPtr(CMGetNameSpace(cop2, NULL))); - */ + // sanity checks - same namespace, class, and property list size char *hn1 = (char*) CMGetCharPtr(CMGetHostname(cop1, pStatus)); char *hn2 = (char*) CMGetCharPtr(CMGetHostname(cop2, pStatus)); + if (hn1 != NULL) + DEBUGOUT(" hn1: %s\n", hn1); + else + DEBUGOUT(" hn1 is NULL\n"); + if (hn2 != NULL) + DEBUGOUT(" hn2: %s\n", hn2); + else + DEBUGOUT(" hn2 is NULL\n"); char *ns1 = (char*) CMGetCharPtr(CMGetNameSpace(cop1, pStatus)); char *ns2 = (char*) CMGetCharPtr(CMGetNameSpace(cop2, pStatus)); + if (ns1 != NULL) + DEBUGOUT(" ns1: %s\n", ns1); + else + DEBUGOUT(" hn1 is NULL\n"); + if (ns2 != NULL) + DEBUGOUT(" ns2: %s\n", ns2); + else + DEBUGOUT(" ns2 is NULL\n"); char *cl1 = (char*) CMGetCharPtr(CMGetClassName(cop1, pStatus)); char *cl2 = (char*) CMGetCharPtr(CMGetClassName(cop2, pStatus)); @@ -506,7 +521,7 @@ unsigned int numkeys1 = CMGetKeyCount(cop1, pStatus); unsigned int numkeys2 = CMGetKeyCount(cop2, pStatus); - if (*hn1 && *hn2) + if (hn1 && hn2 && *hn1 && *hn2) { // only compare if I have a hostname for each if (strcasecmp(hn1, hn2) != 0) // not same @@ -515,7 +530,7 @@ return 0; // FALSE } } - if (*ns1 && *ns2) + if (ns1 && ns2 && *ns1 && *ns2) { // only compare if I have a namespace for each if (strcasecmp(ns1, ns2) != 0) // not same @@ -524,7 +539,7 @@ return 0; // FALSE } } - if (strcasecmp(cl1, cl2) != 0) // not same + if ((cl1 && cl2 && *cl1 && *cl2) && (strcasecmp(cl1, cl2) != 0)) // not same { DEBUGOUT("ClassNames are different: %s != %s\n", cl1, cl2); return 0; // FALSE Modified: sblim-cmpiutil/trunk/src/lib/cmpiutil/fileTools.c =================================================================== --- sblim-cmpiutil/trunk/src/lib/cmpiutil/fileTools.c 2008-07-03 03:14:03 UTC (rev 698) +++ sblim-cmpiutil/trunk/src/lib/cmpiutil/fileTools.c 2008-07-03 17:04:10 UTC (rev 699) @@ -87,19 +87,19 @@ memset(rv, 0, sizeof(cmpiutilFileKeys)); if (S_ISREG(st->st_mode)) { - rv->CreationClassName = "Linux_DataFile"; + rv->CreationClassName = "Linux_LinuxDataFile"; } else if (S_ISDIR(st->st_mode)) { - rv->CreationClassName = "Linux_Directory"; + rv->CreationClassName = "Linux_LinuxDirectory"; } else if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) { - rv->CreationClassName = "Linux_DeviceFile"; + rv->CreationClassName = "Linux_LinuxDeviceFile"; } else if (S_ISFIFO(st->st_mode)) { - rv->CreationClassName = "Linux_FIFOPipeFile"; + rv->CreationClassName = "Linux_LinuxFIFOPipeFile"; } else if (S_ISLNK(st->st_mode)) { - rv->CreationClassName = "Linux_SymbolicLink"; + rv->CreationClassName = "Linux_LinuxSymbolicLink"; } else { free(rv); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-03 03:14:03
|
Revision: 698 http://omc.svn.sourceforge.net/omc/?rev=698&view=rev Author: mike-brasher Date: 2008-07-02 20:14:03 -0700 (Wed, 02 Jul 2008) Log Message: ----------- Added MAC property to LANEndpointProvider. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/LANEndpointProvider.c Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/LANEndpointProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/LANEndpointProvider.c 2008-07-02 21:58:59 UTC (rev 697) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/LANEndpointProvider.c 2008-07-03 03:14:03 UTC (rev 698) @@ -54,6 +54,7 @@ LANEndpoint_Set_SystemCreationClassName(&x, "Linux_ComputerSystem"); LANEndpoint_Set_SystemName(&x, sblim_GetSystemName()); LANEndpoint_Set_Name(&x, p->mac); + LANEndpoint_Set_MACAddress(&x, p->mac); LANEndpoint_Set_NameFormat(&x, "MAC"); switch (p->speed_mbps) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 21:58:51
|
Revision: 697 http://omc.svn.sourceforge.net/omc/?rev=697&view=rev Author: mike-brasher Date: 2008-07-02 14:58:59 -0700 (Wed, 02 Jul 2008) Log Message: ----------- Now using derived overriden references. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/SystemDeviceProvider.c Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/SystemDeviceProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/SystemDeviceProvider.c 2008-07-02 19:52:59 UTC (rev 696) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/SystemDeviceProvider.c 2008-07-02 21:58:59 UTC (rev 697) @@ -33,6 +33,9 @@ const CMPIObjectPath* cop, const char** properties) { + /* Associate Linux_ComputerSystem with every Linux_EthernetPort + * via Linux_SystemDeviceEthernetPort association. + */ return KDefaultEnumerateInstancesOneToAll( _cb, cc, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 19:52:51
|
Revision: 696 http://omc.svn.sourceforge.net/omc/?rev=696&view=rev Author: mike-brasher Date: 2008-07-02 12:52:59 -0700 (Wed, 02 Jul 2008) Log Message: ----------- Modified Linux_DeviceSAPImlementationEthernetPort to override reference types. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.mof cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementation.h cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementationProvider.c Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.mof =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.mof 2008-07-02 19:40:32 UTC (rev 695) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.mof 2008-07-02 19:52:59 UTC (rev 696) @@ -40,6 +40,8 @@ [Association] class Linux_DeviceSAPImplementationEthernetPort : Linux_DeviceSAPImplementation { + Linux_EthernetPort REF Antecedent; + Linux_LANEndpoint REF Dependent; }; [Association] Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementation.h =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementation.h 2008-07-02 19:40:32 UTC (rev 695) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementation.h 2008-07-02 19:52:59 UTC (rev 696) @@ -10,8 +10,8 @@ #define _konkrete_DeviceSAPImplementation_h #include <konkret/konkret.h> -#include "CIM_LogicalDevice.h" -#include "CIM_ServiceAccessPoint.h" +#include "EthernetPort.h" +#include "LANEndpoint.h" /* **============================================================================== @@ -26,8 +26,8 @@ { KBase __base; /* CIM_Dependency features */ - const KRef Antecedent; /* CIM_LogicalDevice */ - const KRef Dependent; /* CIM_ServiceAccessPoint */ + const KRef Antecedent; /* EthernetPort */ + const KRef Dependent; /* LANEndpoint */ /* CIM_DeviceSAPImplementation features */ /* Linux_DeviceSAPImplementation features */ /* Linux_DeviceSAPImplementationEthernetPort features */ @@ -50,8 +50,8 @@ { const unsigned char* sig = __DeviceSAPImplementationRef_sig; KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); - ((KRef*)&self->Antecedent)->__sig = __CIM_LogicalDevice_sig; - ((KRef*)&self->Dependent)->__sig = __CIM_ServiceAccessPoint_sig; + ((KRef*)&self->Antecedent)->__sig = __EthernetPort_sig; + ((KRef*)&self->Dependent)->__sig = __LANEndpoint_sig; } KINLINE CMPIStatus DeviceSAPImplementationRef_InitFromInstance( @@ -114,7 +114,7 @@ KINLINE CMPIStatus DeviceSAPImplementationRef_Set_Antecedent( DeviceSAPImplementationRef* self, - const CIM_LogicalDeviceRef* x) + const EthernetPortRef* x) { if (self && self->__base.magic == KMAGIC) { @@ -157,7 +157,7 @@ KINLINE CMPIStatus DeviceSAPImplementationRef_Set_Dependent( DeviceSAPImplementationRef* self, - const CIM_ServiceAccessPointRef* x) + const LANEndpointRef* x) { if (self && self->__base.magic == KMAGIC) { @@ -200,8 +200,8 @@ { KBase __base; /* CIM_Dependency features */ - const KRef Antecedent; /* CIM_LogicalDevice */ - const KRef Dependent; /* CIM_ServiceAccessPoint */ + const KRef Antecedent; /* EthernetPort */ + const KRef Dependent; /* LANEndpoint */ /* CIM_DeviceSAPImplementation features */ /* Linux_DeviceSAPImplementation features */ /* Linux_DeviceSAPImplementationEthernetPort features */ @@ -224,8 +224,8 @@ { const unsigned char* sig = __DeviceSAPImplementation_sig; KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); - ((KRef*)&self->Antecedent)->__sig = __CIM_LogicalDevice_sig; - ((KRef*)&self->Dependent)->__sig = __CIM_ServiceAccessPoint_sig; + ((KRef*)&self->Antecedent)->__sig = __EthernetPort_sig; + ((KRef*)&self->Dependent)->__sig = __LANEndpoint_sig; } KINLINE CMPIStatus DeviceSAPImplementation_InitFromInstance( @@ -288,7 +288,7 @@ KINLINE CMPIStatus DeviceSAPImplementation_Set_Antecedent( DeviceSAPImplementation* self, - const CIM_LogicalDeviceRef* x) + const EthernetPortRef* x) { if (self && self->__base.magic == KMAGIC) { @@ -331,7 +331,7 @@ KINLINE CMPIStatus DeviceSAPImplementation_Set_Dependent( DeviceSAPImplementation* self, - const CIM_ServiceAccessPointRef* x) + const LANEndpointRef* x) { if (self && self->__base.magic == KMAGIC) { Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementationProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementationProvider.c 2008-07-02 19:40:32 UTC (rev 695) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/DeviceSAPImplementationProvider.c 2008-07-02 19:52:59 UTC (rev 696) @@ -45,7 +45,7 @@ if ((info = GetEthernetPortResources()) == NULL) KReturn2(_cb, ERR_FAILED, "ifconf_info() failed"); - /* For each association */ + /* Association LANEndpoint/EthernetPort pairs */ for (p = info; p; p = p->next) { @@ -69,8 +69,8 @@ /* DeviceSAPImplementation */ DeviceSAPImplementation_Init(&x, _cb, ns); - DeviceSAPImplementation_Set_Antecedent(&x, (CIM_LogicalDeviceRef*)&a); - DeviceSAPImplementation_Set_Dependent(&x, (CIM_ServiceAccessPointRef*)&d); + DeviceSAPImplementation_Set_Antecedent(&x, &a); + DeviceSAPImplementation_Set_Dependent(&x, &d); /* Return instance */ KReturnInstance(cr, x); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 19:40:28
|
Revision: 695 http://omc.svn.sourceforge.net/omc/?rev=695&view=rev Author: mike-brasher Date: 2008-07-02 12:40:32 -0700 (Wed, 02 Jul 2008) Log Message: ----------- Reworked ElementConformsToProfileProvider. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/ElementConformsToProfileProvider.c cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.kon Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/ElementConformsToProfileProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/ElementConformsToProfileProvider.c 2008-07-02 17:00:23 UTC (rev 694) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/ElementConformsToProfileProvider.c 2008-07-02 19:40:32 UTC (rev 695) @@ -36,44 +36,21 @@ { const char* ns = KNameSpace(cop); RegisteredProfileRef cs; - struct EthernetPortResource* info; - struct EthernetPortResource* p; /* Linux_RegisteredProfileEthernetPort.ConformantStandard */ RegisteredProfileRef_Init(&cs, _cb, ns); RegisteredProfileRef_Set_InstanceID(&cs, "SBLIM:Ethernet_Port"); - /* Get interface info list */ - - if (!(info = GetEthernetPortResources())) - KReturn2(_cb, ERR_FAILED, "ifconf_info() failed"); - - /* For each association */ - - for (p = info; p; p = p->next) - { - EthernetPortRef me; - ElementConformsToProfile x; - - /* Linux_RegisteredProfileEthernetPort.ManagedElement */ - EthernetPortRef_Init(&me, _cb, NAMESPACE); - EthernetPortRef_Set_CreationClassName(&me, "Linux_EthernetPort"); - EthernetPortRef_Set_SystemCreationClassName(&me,"Linux_ComputerSystem"); - EthernetPortRef_Set_SystemName(&me, sblim_GetSystemName()); - EthernetPortRef_Set_DeviceID(&me, p->mac); - - /* Linux_RegisteredProfileEthernetPort */ - ElementConformsToProfile_Init(&x, _cb, ns); - ElementConformsToProfile_Set_ConformantStandard(&x, &cs); - ElementConformsToProfile_Set_ManagedElement(&x, &me); - - KReturnInstance(cr, x); - } - - /* Release info list */ - FreeEthernetPortResources(info); - - CMReturn(CMPI_RC_OK); + /* Associate with every instance of Linux_EthernetPort */ + return KDefaultEnumerateInstancesOneToAll( + _cb, + cc, + cr, + cop, + RegisteredProfileRef_ToObjectPath(&cs, NULL), + "ConformantStandard", + CMNewObjectPath(_cb, NAMESPACE, "Linux_EthernetPort", NULL), + "ManagedElement"); } static CMPIStatus ElementConformsToProfileGetInstance( Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.kon =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.kon 2008-07-02 17:00:23 UTC (rev 694) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.kon 2008-07-02 19:40:32 UTC (rev 695) @@ -1,5 +1,6 @@ ## -## This is an input file for the KonkretCMPI konkret command. Use with the -f option as follows: +## This is an input file for the KonkretCMPI konkret command. Use with the -f +## option as follows: ## ## $ konkret [OPTIONS] -f EthernetPort.kon ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-07-02 17:01:02
|
Revision: 694 http://omc.svn.sourceforge.net/omc/?rev=694&view=rev Author: npaxton Date: 2008-07-02 10:00:23 -0700 (Wed, 02 Jul 2008) Log Message: ----------- add csv-style registration file for rpm installs; put mofs/regs into /usr/share/mof/<pkg-name> Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am Added Paths: ----------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.registration Added: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.registration =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.registration (rev 0) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.registration 2008-07-02 17:00:23 UTC (rev 694) @@ -0,0 +1,13 @@ +# Classname Namespace ProviderName ProviderModule ProviderTypes ... +Linux_EthernetPort root/cimv2 EthernetPort linux_ethportprovider instance +Linux_LANEndpoint root/cimv2 LANEndpoint linux_ethportprovider instance +Linux_DeviceSAPImplementationEthernetPort root/cimv2 DeviceSAPImplementation linux_ethportprovider association +Linux_HostedAccessPointEthernetPort root/cimv2 HostedAccessPoint linux_ethportprovider instance association +Linux_SystemDeviceEthernetPort root/cimv2 SystemDevice linux_ethportprovider instance association +Linux_ElementCapabilitiesEthernetPort root/cimv2 ElementCapabilities linux_ethportprovider instance association +Linux_EnabledLogicalElementCapabilitiesEthernetPort root/cimv2 EnabledLogicalElementCapabilities linux_ethportprovider instance +Linux_ElementCapabilitiesLANEndpoint root/cimv2 ElementCapabilitiesLANEndpoint linux_ethportprovider instance association +Linux_EnabledLogicalElementCapabilitiesLANEndpoint root/cimv2 EnabledLogicalElementCapabilitiesLANEndpoint linux_ethportprovider instance +Linux_RegisteredProfileEthernetPort root/interop RegisteredProfile linux_ethportprovider instance +Linux_ReferencedProfileEthernetPort root/interop ReferencedProfile linux_ethportprovider instance association +Linux_ElementConformsToProfileEthernetPort root/interop ElementConformsToProfile linux_ethportprovider instance association Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am 2008-07-02 15:57:59 UTC (rev 693) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am 2008-07-02 17:00:23 UTC (rev 694) @@ -1,5 +1,5 @@ -mof_DATA = EthernetPortInterop.mof EthernetPort.mof +mof_DATA = EthernetPortInterop.mof EthernetPort.mof EthernetPort.registration -mofdir = $(datadir)/mof +mofdir = $(datadir)/mof/$(PACKAGE_NAME) EXTRA_DIST = $(mof_DATA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-07-02 15:57:55
|
Revision: 693 http://omc.svn.sourceforge.net/omc/?rev=693&view=rev Author: npaxton Date: 2008-07-02 08:57:59 -0700 (Wed, 02 Jul 2008) Log Message: ----------- move registration file to mofs dir Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh Added Paths: ----------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.reg Removed Paths: ------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg Copied: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.reg (from rev 692, cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg) =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.reg (rev 0) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/EthernetPort.reg 2008-07-02 15:57:59 UTC (rev 693) @@ -0,0 +1,84 @@ +##============================================================================== +## +## root/cimv2 +## +##============================================================================== + +[Linux_EthernetPort] + provider: EthernetPort + location: linux_ethportprovider + type: instance + namespace: root/cimv2 + +[Linux_LANEndpoint] + provider: LANEndpoint + location: linux_ethportprovider + type: instance + namespace: root/cimv2 + +[Linux_DeviceSAPImplementationEthernetPort] + provider: DeviceSAPImplementation + location: linux_ethportprovider + type: instance association + namespace: root/cimv2 + +[Linux_HostedAccessPointEthernetPort] + provider: HostedAccessPoint + location: linux_ethportprovider + type: instance association + namespace: root/cimv2 + +[Linux_SystemDeviceEthernetPort] + provider: SystemDevice + location: linux_ethportprovider + type: instance association + namespace: root/cimv2 + +[Linux_ElementCapabilitiesEthernetPort] + provider: ElementCapabilities + location: linux_ethportprovider + type: instance association + namespace: root/cimv2 + +[Linux_EnabledLogicalElementCapabilitiesEthernetPort] + provider: EnabledLogicalElementCapabilities + location: linux_ethportprovider + type: instance + namespace: root/cimv2 + +[Linux_ElementCapabilitiesLANEndpoint] + provider: ElementCapabilitiesLANEndpoint + location: linux_ethportprovider + type: instance association + namespace: root/cimv2 + +[Linux_EnabledLogicalElementCapabilitiesLANEndpoint] + provider: EnabledLogicalElementCapabilitiesLANEndpoint + location: linux_ethportprovider + type: instance + namespace: root/cimv2 + +##============================================================================== +## +## root/interop +## +##============================================================================== + +[Linux_RegisteredProfileEthernetPort] + provider: RegisteredProfile + location: linux_ethportprovider + type: instance + namespace: root/interop + +[Linux_ReferencedProfileEthernetPort] + provider: ReferencedProfile + location: linux_ethportprovider + type: instance association + namespace: root/interop + +[Linux_ElementConformsToProfileEthernetPort] + provider: ElementConformsToProfile + location: linux_ethportprovider + type: instance association + namespace: root/interop + Deleted: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg 2008-07-02 14:58:06 UTC (rev 692) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg 2008-07-02 15:57:59 UTC (rev 693) @@ -1,84 +0,0 @@ -##============================================================================== -## -## root/cimv2 -## -##============================================================================== - -[Linux_EthernetPort] - provider: EthernetPort - location: linux_ethportprovider - type: instance - namespace: root/cimv2 - -[Linux_LANEndpoint] - provider: LANEndpoint - location: linux_ethportprovider - type: instance - namespace: root/cimv2 - -[Linux_DeviceSAPImplementationEthernetPort] - provider: DeviceSAPImplementation - location: linux_ethportprovider - type: instance association - namespace: root/cimv2 - -[Linux_HostedAccessPointEthernetPort] - provider: HostedAccessPoint - location: linux_ethportprovider - type: instance association - namespace: root/cimv2 - -[Linux_SystemDeviceEthernetPort] - provider: SystemDevice - location: linux_ethportprovider - type: instance association - namespace: root/cimv2 - -[Linux_ElementCapabilitiesEthernetPort] - provider: ElementCapabilities - location: linux_ethportprovider - type: instance association - namespace: root/cimv2 - -[Linux_EnabledLogicalElementCapabilitiesEthernetPort] - provider: EnabledLogicalElementCapabilities - location: linux_ethportprovider - type: instance - namespace: root/cimv2 - -[Linux_ElementCapabilitiesLANEndpoint] - provider: ElementCapabilitiesLANEndpoint - location: linux_ethportprovider - type: instance association - namespace: root/cimv2 - -[Linux_EnabledLogicalElementCapabilitiesLANEndpoint] - provider: EnabledLogicalElementCapabilitiesLANEndpoint - location: linux_ethportprovider - type: instance - namespace: root/cimv2 - -##============================================================================== -## -## root/interop -## -##============================================================================== - -[Linux_RegisteredProfileEthernetPort] - provider: RegisteredProfile - location: linux_ethportprovider - type: instance - namespace: root/interop - -[Linux_ReferencedProfileEthernetPort] - provider: ReferencedProfile - location: linux_ethportprovider - type: instance association - namespace: root/interop - -[Linux_ElementConformsToProfileEthernetPort] - provider: ElementConformsToProfile - location: linux_ethportprovider - type: instance association - namespace: root/interop - Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh 2008-07-02 14:58:06 UTC (rev 692) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh 2008-07-02 15:57:59 UTC (rev 693) @@ -9,5 +9,5 @@ cp ../mof/EthernetPort.mof $MOFSDIR/root/cimv2 mkdir -p $MOFSDIR/root/interop cp ../mof/EthernetPortInterop.mof $MOFSDIR/root/interop -cp EthernetPort.reg $REGSDIR +cp ../mof/EthernetPort.reg $REGSDIR $PREFIX/bin/sfcbrepos < yes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 14:58:02
|
Revision: 692 http://omc.svn.sourceforge.net/omc/?rev=692&view=rev Author: mike-brasher Date: 2008-07-02 07:58:06 -0700 (Wed, 02 Jul 2008) Log Message: ----------- Finished install script for testing provider. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh 2008-07-02 01:39:34 UTC (rev 691) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh 2008-07-02 14:58:06 UTC (rev 692) @@ -1,11 +1,10 @@ #!/bin/sh - -BASE=linux_ethportprovider +TARGET=liblinux_ethportprovider.so PREFIX=/usr/local MOFSDIR=$PREFIX/var/lib/sfcb/stage/mofs REGSDIR=$PREFIX/var/lib/sfcb/stage/regs -cp lib$BASE.la $PREFIX/lib/lib$BASE.so +cp .libs/$TARGET.0.0.0 $PREFIX/lib/$TARGET mkdir -p $MOFSDIR/root/cimv2 cp ../mof/EthernetPort.mof $MOFSDIR/root/cimv2 mkdir -p $MOFSDIR/root/interop This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 01:39:24
|
Revision: 691 http://omc.svn.sourceforge.net/omc/?rev=691&view=rev Author: mike-brasher Date: 2008-07-01 18:39:34 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Added install rule for MOFs. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am 2008-07-02 01:21:10 UTC (rev 690) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/mof/Makefile.am 2008-07-02 01:39:34 UTC (rev 691) @@ -1,3 +1,5 @@ -EXTRA_DIST = \ - EthernetPortInterop.mof \ - EthernetPort.mof +mof_DATA = EthernetPortInterop.mof EthernetPort.mof + +mofdir = $(datadir)/mof + +EXTRA_DIST = $(mof_DATA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 01:21:10
|
Revision: 690 http://omc.svn.sourceforge.net/omc/?rev=690&view=rev Author: mike-brasher Date: 2008-07-01 18:21:10 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Now installing provider under $(libdir)/cmpi Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.am Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.am =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.am 2008-07-02 00:55:17 UTC (rev 689) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.am 2008-07-02 01:21:10 UTC (rev 690) @@ -1,4 +1,5 @@ -lib_LTLIBRARIES = liblinux_ethportprovider.la +provider_LTLIBRARIES = liblinux_ethportprovider.la +providerdir = $(libdir)/cmpi liblinux_ethportprovider_la_SOURCES = \ common.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 00:55:10
|
Revision: 689 http://omc.svn.sourceforge.net/omc/?rev=689&view=rev Author: mike-brasher Date: 2008-07-01 17:55:17 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Removed unised makefile. Removed Paths: ------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.original Deleted: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.original =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.original 2008-07-02 00:52:26 UTC (rev 688) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/Makefile.original 2008-07-02 00:55:17 UTC (rev 689) @@ -1,69 +0,0 @@ -TARGET = libEthernetPortProvider.so - -SOURCES = \ - common.c \ - EthernetPortResource.c \ - LANEndpointProvider.c \ - EthernetPortProvider.c \ - DeviceSAPImplementationProvider.c \ - HostedAccessPointProvider.c \ - RegisteredProfileProvider.c \ - ElementConformsToProfileProvider.c \ - ReferencedProfileProvider.c \ - SystemDeviceProvider.c \ - EnabledLogicalElementCapabilitiesProvider.c \ - ElementCapabilitiesProvider.c \ - EnabledLogicalElementCapabilitiesLANEndpointProvider.c \ - ElementCapabilitiesLANEndpointProvider.c - -LIBRARIES += konkret - -FLAGS = -fPIC -Wall -O2 - -OBJECTS = $(SOURCES:.c=.o) - -$(TARGET): $(OBJECTS) - gcc -shared $(FLAGS) -o $(TARGET) $(OBJECTS) -lkonkret - -%.o : %.c - gcc -c $(FLAGS) $< - -clean: - rm -f $(TARGET) $(OBJECTS) - -##============================================================================== -## -## gen: -## -##============================================================================== - -PREFIX=/usr/local -MOFSDIR=$(PREFIX)/var/lib/sfcb/stage/mofs -REGSDIR=$(PREFIX)/var/lib/sfcb/stage/regs - -MOFS = \ - -m $(MOFSDIR)/root/cimv2/Linux_Base.mof \ - -m EthernetPort.mof \ - -m EthernetPortInterop.mof \ - -gen: - konkret $(MOFS) -f EthernetPort.kon - -##============================================================================== -## -## install: -## -##============================================================================== - -install: - su -c "make install-su" - -install-su: - cp $(TARGET) $(PREFIX)/lib - mkdir -p $(MOFSDIR)/root/cimv2 - cp EthernetPort.mof $(MOFSDIR)/root/cimv2 - mkdir -p $(MOFSDIR)/root/interop - cp EthernetPortInterop.mof $(MOFSDIR)/root/interop - cp EthernetPort.reg $(REGSDIR) - $(PREFIX)/bin/sfcbrepos < yes - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 00:52:18
|
Revision: 688 http://omc.svn.sourceforge.net/omc/?rev=688&view=rev Author: mike-brasher Date: 2008-07-01 17:52:26 -0700 (Tue, 01 Jul 2008) Log Message: ----------- New script. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg Added Paths: ----------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg 2008-07-02 00:40:58 UTC (rev 687) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/EthernetPort.reg 2008-07-02 00:52:26 UTC (rev 688) @@ -6,55 +6,55 @@ [Linux_EthernetPort] provider: EthernetPort - location: EthernetPortProvider + location: linux_ethportprovider type: instance namespace: root/cimv2 [Linux_LANEndpoint] provider: LANEndpoint - location: EthernetPortProvider + location: linux_ethportprovider type: instance namespace: root/cimv2 [Linux_DeviceSAPImplementationEthernetPort] provider: DeviceSAPImplementation - location: EthernetPortProvider + location: linux_ethportprovider type: instance association namespace: root/cimv2 [Linux_HostedAccessPointEthernetPort] provider: HostedAccessPoint - location: EthernetPortProvider + location: linux_ethportprovider type: instance association namespace: root/cimv2 [Linux_SystemDeviceEthernetPort] provider: SystemDevice - location: EthernetPortProvider + location: linux_ethportprovider type: instance association namespace: root/cimv2 [Linux_ElementCapabilitiesEthernetPort] provider: ElementCapabilities - location: EthernetPortProvider + location: linux_ethportprovider type: instance association namespace: root/cimv2 [Linux_EnabledLogicalElementCapabilitiesEthernetPort] provider: EnabledLogicalElementCapabilities - location: EthernetPortProvider + location: linux_ethportprovider type: instance namespace: root/cimv2 [Linux_ElementCapabilitiesLANEndpoint] provider: ElementCapabilitiesLANEndpoint - location: EthernetPortProvider + location: linux_ethportprovider type: instance association namespace: root/cimv2 [Linux_EnabledLogicalElementCapabilitiesLANEndpoint] provider: EnabledLogicalElementCapabilitiesLANEndpoint - location: EthernetPortProvider + location: linux_ethportprovider type: instance namespace: root/cimv2 @@ -66,19 +66,19 @@ [Linux_RegisteredProfileEthernetPort] provider: RegisteredProfile - location: EthernetPortProvider + location: linux_ethportprovider type: instance namespace: root/interop [Linux_ReferencedProfileEthernetPort] provider: ReferencedProfile - location: EthernetPortProvider + location: linux_ethportprovider type: instance association namespace: root/interop [Linux_ElementConformsToProfileEthernetPort] provider: ElementConformsToProfile - location: EthernetPortProvider + location: linux_ethportprovider type: instance association namespace: root/interop Added: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh (rev 0) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh 2008-07-02 00:52:26 UTC (rev 688) @@ -0,0 +1,14 @@ +#!/bin/sh + +BASE=linux_ethportprovider +PREFIX=/usr/local +MOFSDIR=$PREFIX/var/lib/sfcb/stage/mofs +REGSDIR=$PREFIX/var/lib/sfcb/stage/regs + +cp lib$BASE.la $PREFIX/lib/lib$BASE.so +mkdir -p $MOFSDIR/root/cimv2 +cp ../mof/EthernetPort.mof $MOFSDIR/root/cimv2 +mkdir -p $MOFSDIR/root/interop +cp ../mof/EthernetPortInterop.mof $MOFSDIR/root/interop +cp EthernetPort.reg $REGSDIR +$PREFIX/bin/sfcbrepos < yes Property changes on: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/install.sh ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 00:40:54
|
Revision: 687 http://omc.svn.sourceforge.net/omc/?rev=687&view=rev Author: mike-brasher Date: 2008-07-01 17:40:58 -0700 (Tue, 01 Jul 2008) Log Message: ----------- New script to generate konkret headers. Added Paths: ----------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/konkret.sh Added: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/konkret.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/konkret.sh (rev 0) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/konkret.sh 2008-07-02 00:40:58 UTC (rev 687) @@ -0,0 +1,2 @@ +#!/bin/sh +konkret -m /usr/local/var/lib/sfcb/stage/mofs/root/cimv2/Linux_Base.mof -m ../mof/EthernetPort.mof -m ../mof/EthernetPortInterop.mof -f EthernetPort.kon Property changes on: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/src/konkret.sh ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 00:34:00
|
Revision: 686 http://omc.svn.sourceforge.net/omc/?rev=686&view=rev Author: mike-brasher Date: 2008-07-01 17:34:09 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Added checks for konkret dependencies. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac 2008-07-02 00:28:21 UTC (rev 685) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac 2008-07-02 00:34:09 UTC (rev 686) @@ -11,6 +11,8 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET -AC_CHECK_LIB(konkret,KPrintInstance,,[AC_MSG_ERROR(missing required library: konkret)]) +AC_CHECK_LIB(konkret,KPrintInstance,,[AC_MSG_ERROR(missing required library: konkret: please install KonkretCMPI)]) +AC_CHECK_HEADERS(konkret/konkret.h,,[AC_MSG_ERROR(missing required header: konkret.h: please install KonkretCMPI)]) +AC_CHECK_HEADERS(konkret/configure.h,,[AC_MSG_ERROR(missing required header: configure.h: please install KonkretCMPI)]) AC_CONFIG_FILES([Makefile src/Makefile mof/Makefile]) AC_OUTPUT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 00:28:13
|
Revision: 685 http://omc.svn.sourceforge.net/omc/?rev=685&view=rev Author: mike-brasher Date: 2008-07-01 17:28:21 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Removed generated file. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh 2008-07-02 00:26:45 UTC (rev 684) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh 2008-07-02 00:28:21 UTC (rev 685) @@ -17,4 +17,5 @@ mof/Makefile.in \ src/Makefile.in \ INSTALL \ - COPYING + COPYING \ + config.h.in~ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 00:26:37
|
Revision: 684 http://omc.svn.sourceforge.net/omc/?rev=684&view=rev Author: mike-brasher Date: 2008-07-01 17:26:45 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Added check to autotools for konkret library. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac 2008-07-02 00:02:23 UTC (rev 683) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/configure.ac 2008-07-02 00:26:45 UTC (rev 684) @@ -11,5 +11,6 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET +AC_CHECK_LIB(konkret,KPrintInstance,,[AC_MSG_ERROR(missing required library: konkret)]) AC_CONFIG_FILES([Makefile src/Makefile mof/Makefile]) AC_OUTPUT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-07-02 00:02:15
|
Revision: 683 http://omc.svn.sourceforge.net/omc/?rev=683&view=rev Author: mike-brasher Date: 2008-07-01 17:02:23 -0700 (Tue, 01 Jul 2008) Log Message: ----------- Remove INSTALL and COPYING Modified Paths: -------------- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh Modified: cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh =================================================================== --- cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh 2008-07-01 23:53:36 UTC (rev 682) +++ cmpiprofiles/sblim-cmpi-ethernet_port_profile/trunk/cleanup.sh 2008-07-02 00:02:23 UTC (rev 683) @@ -15,4 +15,6 @@ aclocal.m4 \ install-sh \ mof/Makefile.in \ - src/Makefile.in + src/Makefile.in \ + INSTALL \ + COPYING This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |