Changeset 1151

Show
Ignore:
Timestamp:
11/19/08 16:08:07 (2 months ago)
Author:
tex
Message:

Updating and commit DMTF profile 1.0.1 conformed version

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Linux_Management_Providers/Record_Log/trunk

    • Property svn:ignore changed from
      autom4te.cache
      aclocal.m4
      config.h.in
      configure
      to
      autom4te.cache
      aclocal.m4
      config.h.in
      configure
      config.h
      config.guess
      config.status
      config.sub
      depcomp
      install-sh
      libtool
      ltmain.sh
      Makefile
      Makefile.in
      missing
      stamp-h1
  • Linux_Management_Providers/Record_Log/trunk/Common/OpenDRIM_RecordLogPackage_Common.h

    r1110 r1151  
    22# Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package 
    33# Copyright (C) 2007 Ilsoo Byun <widepis@etri.re.kr> 
    4 #  
     4# 
    55# This program is being developed under the "OpenDRIM" project. 
    66# The "OpenDRIM" project web page: www.opendrim.org 
    77# The "OpenDRIM" project mailing list: opendrim@googlegroups.com 
    8 #  
     8# 
    99# This program is free software; you can redistribute it and/or 
    1010# modify it under the terms of the GNU General Public License 
    1111# as published by the Free Software Foundation; version 2 
    1212# of the License. 
    13 #  
     13# 
    1414# This program is distributed in the hope that it will be useful, 
    1515# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1616# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1717# GNU General Public License for more details. 
    18 #  
     18# 
    1919# You should have received a copy of the GNU General Public License 
    2020# along with this program; if not, write to the Free Software 
     
    2525# To contributors, please leave your contact information in this section 
    2626# AND comment your changes in the source code. 
    27 #  
     27# 
    2828# Modified by <Author(s)>, <Affiliation>, <Year> 
    2929###############################################################################*/ 
     
    3434#include <Common.h> 
    3535 
     36// Define LogState Constants 
     37#define LS_NOT_APPLICABLE       4 
     38 
     39// Define EnabledState Constants 
     40#define ES_NOT_APPLICABLE       5 
     41 
     42// Define RequestedState Constants 
     43#define RS_NOT_APPLICABLE       12 
     44 
    3645string CF_logTimeFormat(const string& ptime, struct tm* tp); 
    3746 
  • Linux_Management_Providers/Record_Log/trunk/Makefile.am

    r836 r1151  
    3131VENDOR = OpenDRIM 
    3232 
    33 VERSION = 1.0.0 
     33VERSION = $(shell cat ./VERSION) 
    3434 
    35 SUBDIRS = Common OpenDRIM_RecordLogCapabilities OpenDRIM_RecordLog OpenDRIM_RecordLogProfile OpenDRIM_LogEntry OpenDRIM_LogManagesRecord OpenDRIM_RecordLogConformsToProfile OpenDRIM_RecordLogToCapabilities test 
     35APP_NAME = opendrim-lmp-opendrimrecordlogpackage 
     36 
     37RPM_PACKAGE_DIR = packaging 
     38 
     39PLATFORM = $(shell rpm --eval %_target_cpu) 
     40 
     41WORKING_DIR = $(shell pwd) 
     42 
     43SUBDIRS = Common OpenDRIM_RecordLogCapabilities OpenDRIM_RecordLog OpenDRIM_UseOfLog OpenDRIM_RecordLogProfile OpenDRIM_LogEntry OpenDRIM_LogManagesRecord OpenDRIM_RecordLogConformsToProfile OpenDRIM_RecordLogToCapabilities test 
    3644 
    3745install-providerdir: 
     
    4351        make -C Common install-strip 
    4452        make -C OpenDRIM_RecordLogCapabilities install-strip 
     53        make -C OpenDRIM_RecordLog install-strip 
    4554        make -C OpenDRIM_LogManagesRecord install-strip 
    46         make -C OpenDRIM_RecordLog install-strip 
     55        make -C OpenDRIM_UseOfLog install-strip 
     56        make -C OpenDRIM_RecordLogProfile install-strip 
    4757        make -C OpenDRIM_RecordLogConformsToProfile install-strip 
    48         make -C OpenDRIM_RecordLogProfile install-strip 
    4958        make -C OpenDRIM_LogEntry install-strip 
    5059        make -C OpenDRIM_RecordLogToCapabilities install-strip 
     
    5968        make -C test test-OpenDRIM_RecordLogCapabilities 
    6069         
     70test-OpenDRIM_RecordLog: all 
     71        make -C test test-OpenDRIM_RecordLog 
     72 
    6173test-OpenDRIM_LogManagesRecord: all 
    6274        make -C test test-OpenDRIM_LogManagesRecord 
    6375         
    64 test-OpenDRIM_RecordLog: all 
    65         make -C test test-OpenDRIM_RecordLog 
    66          
    67 test-OpenDRIM_RecordLogConformsToProfile: all 
    68         make -C test test-OpenDRIM_RecordLogConformsToProfile 
     76test-OpenDRIM_UseOfLog: all 
     77        make -C test test-OpenDRIM_UseOfLog 
    6978         
    7079test-OpenDRIM_RecordLogProfile: all 
    7180        make -C test test-OpenDRIM_RecordLogProfile 
     81 
     82test-OpenDRIM_RecordLogConformsToProfile: all 
     83        make -C test test-OpenDRIM_RecordLogConformsToProfile 
    7284         
    7385test-OpenDRIM_LogEntry: all 
     
    7789        make -C test test-OpenDRIM_RecordLogToCapabilities 
    7890         
     91pkg-src: 
     92        rm -rf packaging/$(APP_NAME)-$(VERSION) 
     93        rm -rf .tmp 
     94        mkdir .tmp 
     95        cp -r ./* .tmp/ 
     96        rm -rf ./tmp/packaging/ 
     97        mv .tmp packaging/$(APP_NAME)-$(VERSION) 
     98        tar --directory packaging -zcf packaging/$(APP_NAME)-$(VERSION).tar.gz $(APP_NAME)-$(VERSION) 
     99        rm -rf packaging/$(APP_NAME)-$(VERSION) 
     100 
     101pkg-rpm: pkg-src 
     102        mkdir -p $(RPM_PACKAGE_DIR)/rpm/RPMS/$(PLATFORM) 
     103        mkdir -p $(RPM_PACKAGE_DIR)/rpm/SRPMS 
     104        mkdir -p $(RPM_PACKAGE_DIR)/rpm/BUILD 
     105        mkdir -p $(RPM_PACKAGE_DIR)/rpm/SOURCES 
     106        mkdir -p $(RPM_PACKAGE_DIR)/rpm/tmp 
     107        - rm -r $(RPM_PACKAGE_DIR)/rpm/BUILD/$(APP_NAME)-root 
     108        - rm -r $(RPM_PACKAGE_DIR)/rpm/RPMS/$(APP_NAME)-* 
     109        - rm -r $(RPM_PACKAGE_DIR)/rpm/SRPMS/$(APP_NAME)-* 
     110        - rm -r $(RPM_PACKAGE_DIR)/rpm/SOURCES/$(APP_NAME)-* 
     111        mv packaging/$(APP_NAME)-$(VERSION).tar.gz $(RPM_PACKAGE_DIR)/rpm/SOURCES/ 
     112        rpmbuild --define="_topdir $(WORKING_DIR)/$(RPM_PACKAGE_DIR)/rpm" --define="version $(VERSION)" -ba $(RPM_PACKAGE_DIR)/$(APP_NAME).spec 
     113 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_LogEntry/OpenDRIM_LogEntryAccess.cpp

    r1110 r1151  
    22# Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package 
    33# Copyright (C) 2007 Ilsoo Byun <widepis@etri.re.kr ,widepis@gmail.com> 
    4 #  
     4# 
    55# This program is being developed under the "OpenDRIM" project. 
    66# The "OpenDRIM" project web page: www.opendrim.org 
    77# The "OpenDRIM" project mailing list: opendrim@googlegroups.com 
    8 #  
     8# 
    99# This program is free software; you can redistribute it and/or 
    1010# modify it under the terms of the GNU General Public License 
    1111# as published by the Free Software Foundation; version 2 
    1212# of the License. 
    13 #  
     13# 
    1414# This program is distributed in the hope that it will be useful, 
    1515# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1616# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1717# GNU General Public License for more details. 
    18 #  
     18# 
    1919# You should have received a copy of the GNU General Public License 
    2020# along with this program; if not, write to the Free Software 
     
    2525# To contributors, please leave your contact information in this section 
    2626# AND comment your changes in the source code. 
    27 #  
     27# 
    2828# Modified by <Author(s)>, <Affiliation>, <Year> 
    2929###############################################################################*/ 
     
    5555                return FAILED; 
    5656        } 
    57          
    58         time_t timep;   
     57 
     58        time_t timep; 
    5959        time(&timep); 
    6060        struct tm *tp = localtime(&timep); 
    61          
     61 
    6262        OpenDRIM_LogEntry instance; 
    6363        string line; 
     
    7272        return OK; 
    7373} 
    74                                                                                  
     74 
    7575 
    7676int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_retrieve(const CMPIBroker* broker, const CMPIContext* ctx, vector<OpenDRIM_LogEntry>& result, const char** properties, string& errorMessage, const string& discriminant) { 
     
    9494                string subject_timestamp = instance.InstanceID.substr(instance.InstanceID.find(':')+1); 
    9595                vector<OpenDRIM_LogEntry> result; 
    96                  
     96 
    9797                ifstream ifs(filename.c_str()); 
    9898                if (ifs.bad()) { 
     
    101101                        return FAILED; 
    102102                } 
    103                  
    104                 time_t timep;   
     103 
     104                time_t timep; 
    105105                time(&timep); 
    106106                struct tm *tp = localtime(&timep); 
    107                  
     107 
    108108                string line; 
    109109                while (getline(ifs, line)) { 
     
    118118                } 
    119119                ifs.close(); 
    120                  
     120 
    121121                errorMessage = "No instance"; 
    122                 return NOT_FOUND;               
     122                return NOT_FOUND; 
    123123        } else { 
    124124                errorMessage = "No key property"; 
     
    149149int OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_populate(OpenDRIM_LogEntry& instance, const string& filename, string& line, struct tm* tp, const string& discriminant, string& errorMessage) { 
    150150        _E_; 
     151 
     152        /* 
     153         * Properties to fill from profile 
     154         * + Mandatory: 
     155         * [X] InstanceID                       [KEY] 
     156         * [X] RecordID 
     157         * [X] CreationTimestamp 
     158         * [X] ElementName 
     159         * + Optional: 
     160         * [X] LogInstanceID 
     161         * [X] LogName 
     162         * [X] RecordData 
     163         * [X] RecordFormat 
     164         */ 
     165 
    151166        string timestamp = CF_logTimeFormat(line.substr(0, LOG_TIME_LIMIT), tp); 
    152167        string id = filename+":"+timestamp; 
     
    172187                return FAILED; 
    173188        } 
    174          
    175         time_t timep;   
     189 
     190        time_t timep; 
    176191        time(&timep); 
    177192        struct tm *tp = localtime(&timep); 
    178          
     193 
    179194        string line; 
    180195        while (getline(ifs, line)) { 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_LogEntry/OpenDRIM_LogEntryProvider.cpp

    r1110 r1151  
    170170                return rc; 
    171171        } 
    172         CMPIInstance* _ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIInstance(_broker, instance); 
    173         CMReturnInstance(rslt, _ci); 
     172        CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_LogEntry_toCMPIObjectPath(_broker, instance); 
     173        CMReturnObjectPath(rslt, _cop); 
    174174        CMReturnDone(rslt); 
    175175        _L_; 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_LogManagesRecord/Makefile.am

    r836 r1151  
    4545 
    4646# Override libtool installation, we don't need .la and .a 
    47 # We also strip the library to save some space 
    4847install: all 
     48        $(INSTALL) .libs/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider.so $(PROVIDERDIR) 
     49 
     50install-strip: all 
    4951        $(INSTALL) -s .libs/libcmpiOpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecordProvider.so $(PROVIDERDIR) 
    5052 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_LogManagesRecord/OpenDRIM_LogManagesRecord.h

    r842 r1151  
    22# Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package 
    33# Copyright (C) 2007 Ilsoo Byun <widepis@etri.re.kr> 
    4 #  
     4# 
    55# This program is being developed under the "OpenDRIM" project. 
    66# The "OpenDRIM" project web page: www.opendrim.org 
    77# The "OpenDRIM" project mailing list: opendrim@googlegroups.com 
    8 #  
     8# 
    99# This program is free software; you can redistribute it and/or 
    1010# modify it under the terms of the GNU General Public License 
    1111# as published by the Free Software Foundation; version 2 
    1212# of the License. 
    13 #  
     13# 
    1414# This program is distributed in the hope that it will be useful, 
    1515# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1616# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1717# GNU General Public License for more details. 
    18 #  
     18# 
    1919# You should have received a copy of the GNU General Public License 
    2020# along with this program; if not, write to the Free Software 
     
    2525# To contributors, please leave your contact information in this section 
    2626# AND comment your changes in the source code. 
    27 #  
     27# 
    2828# Modified by <Author(s)>, <Affiliation>, <Year> 
    2929###############################################################################*/ 
     
    4545static string OpenDRIM_LogManagesRecord_NAMESPACE = _NAMESPACE; 
    4646const static string Record_role = "Record"; 
    47 const static char* Record_classnames[] = {"OpenDRIM_LogEntry", "CIM_LogEntry", "CIM_RecordForLog"}; 
     47const static char* Record_classnames[] = {"OpenDRIM_LogEntry"}; // CIM_LogEntry 
    4848const static string Record_NAMESPACE = _NAMESPACE; 
    4949 
    5050const static string Log_role = "Log"; 
    51 const static char* Log_classnames[] = {"OpenDRIM_RecordLog", "CIM_RecordLog", "CIM_Log"}; 
     51const static char* Log_classnames[] = {"OpenDRIM_RecordLog"}; // CIM_RecordLog 
    5252const static string Log_NAMESPACE = _NAMESPACE; 
    5353 
     
    5555 
    5656public: 
    57          
     57 
    5858        Objectpath Log; 
    5959        bool Log_isNULL; 
    60                  
     60 
    6161        Objectpath Record; 
    6262        bool Record_isNULL; 
    63                  
     63 
    6464        OpenDRIM_LogManagesRecord() { 
    6565                Log_isNULL = true; 
    6666                Record_isNULL = true; 
    6767        } 
    68          
     68 
    6969        ~OpenDRIM_LogManagesRecord() {} 
    70          
     70 
    7171        string getKeys() const { 
    7272                return CF_toLowCase(".Log=\"" + CF_quoteString(Log.toString()) + "\""".Record=\"" + CF_quoteString(Record.toString()) + "\""); 
     
    7979                return OK; 
    8080        } 
    81          
     81 
    8282        int setLog(const Objectpath& newValue) { 
    8383                Log = newValue; 
     
    9393                return OK; 
    9494        } 
    95          
     95 
    9696        int setRecord(const Objectpath& newValue) { 
    9797                Record = newValue; 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_LogManagesRecord/OpenDRIM_LogManagesRecordProvider.cpp

    r836 r1151  
    169169                return rc; 
    170170        } 
    171         CMPIInstance* _ci = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIInstance(_broker, instance); 
    172         CMReturnInstance(rslt, _ci); 
     171        CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_LogManagesRecord_toCMPIObjectPath(_broker, instance); 
     172        CMReturnObjectPath(rslt, _cop); 
    173173        CMReturnDone(rslt); 
    174174        _L_; 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_RecordLog/OpenDRIM_RecordLog.h

    r836 r1151  
    6868        bool HealthState_isNULL; 
    6969                 
     70        unsigned short PrimaryStatus; 
     71        bool PrimaryStatus_isNULL; 
     72                 
     73        unsigned short DetailedStatus; 
     74        bool DetailedStatus_isNULL; 
     75                 
     76        unsigned short OperatingStatus; 
     77        bool OperatingStatus_isNULL; 
     78                 
     79        unsigned short CommunicationStatus; 
     80        bool CommunicationStatus_isNULL; 
     81                 
    7082        unsigned short EnabledState; 
    7183        bool EnabledState_isNULL; 
     
    8294        string TimeOfLastStateChange; 
    8395        bool TimeOfLastStateChange_isNULL; 
     96                 
     97        vector<unsigned short> AvailableRequestedStates; 
     98        bool AvailableRequestedStates_isNULL; 
     99                 
     100        unsigned short TransitioningToState; 
     101        bool TransitioningToState_isNULL; 
    84102                 
    85103        unsigned long long MaxNumberOfRecords; 
     
    114132                Status_isNULL = true; 
    115133                HealthState_isNULL = true; 
     134                PrimaryStatus_isNULL = true; 
     135                DetailedStatus_isNULL = true; 
     136                OperatingStatus_isNULL = true; 
     137                CommunicationStatus_isNULL = true; 
    116138                EnabledState_isNULL = true; 
    117139                OtherEnabledState_isNULL = true; 
     
    119141                EnabledDefault_isNULL = true; 
    120142                TimeOfLastStateChange_isNULL = true; 
     143                AvailableRequestedStates_isNULL = true; 
     144                TransitioningToState_isNULL = true; 
    121145                MaxNumberOfRecords_isNULL = true; 
    122146                CurrentNumberOfRecords_isNULL = true; 
     
    251275        } 
    252276 
     277        int getPrimaryStatus(unsigned short& value) const { 
     278                if (PrimaryStatus_isNULL==true) 
     279                        return NOT_FOUND; 
     280                value = PrimaryStatus; 
     281                return OK; 
     282        } 
     283         
     284        int setPrimaryStatus(const unsigned short& newValue) { 
     285                PrimaryStatus = newValue; 
     286                PrimaryStatus_isNULL = false; 
     287                return OK; 
     288        } 
     289 
     290        int getDetailedStatus(unsigned short& value) const { 
     291                if (DetailedStatus_isNULL==true) 
     292                        return NOT_FOUND; 
     293                value = DetailedStatus; 
     294                return OK; 
     295        } 
     296         
     297        int setDetailedStatus(const unsigned short& newValue) { 
     298                DetailedStatus = newValue; 
     299                DetailedStatus_isNULL = false; 
     300                return OK; 
     301        } 
     302 
     303        int getOperatingStatus(unsigned short& value) const { 
     304                if (OperatingStatus_isNULL==true) 
     305                        return NOT_FOUND; 
     306                value = OperatingStatus; 
     307                return OK; 
     308        } 
     309         
     310        int setOperatingStatus(const unsigned short& newValue) { 
     311                OperatingStatus = newValue; 
     312                OperatingStatus_isNULL = false; 
     313                return OK; 
     314        } 
     315 
     316        int getCommunicationStatus(unsigned short& value) const { 
     317                if (CommunicationStatus_isNULL==true) 
     318                        return NOT_FOUND; 
     319                value = CommunicationStatus; 
     320                return OK; 
     321        } 
     322         
     323        int setCommunicationStatus(const unsigned short& newValue) { 
     324                CommunicationStatus = newValue; 
     325                CommunicationStatus_isNULL = false; 
     326                return OK; 
     327        } 
     328 
    253329        int getEnabledState(unsigned short& value) const { 
    254330                if (EnabledState_isNULL==true) 
     
    313389                TimeOfLastStateChange = newValue; 
    314390                TimeOfLastStateChange_isNULL = false; 
     391                return OK; 
     392        } 
     393 
     394        int getAvailableRequestedStates(vector<unsigned short>& value) const { 
     395                if (AvailableRequestedStates_isNULL==true) 
     396                        return NOT_FOUND; 
     397                value = AvailableRequestedStates; 
     398                return OK; 
     399        } 
     400         
     401        int setAvailableRequestedStates(const vector<unsigned short>& newValue) { 
     402                AvailableRequestedStates = newValue; 
     403                AvailableRequestedStates_isNULL = false; 
     404                return OK; 
     405        } 
     406 
     407        int getTransitioningToState(unsigned short& value) const { 
     408                if (TransitioningToState_isNULL==true) 
     409                        return NOT_FOUND; 
     410                value = TransitioningToState; 
     411                return OK; 
     412        } 
     413         
     414        int setTransitioningToState(const unsigned short& newValue) { 
     415                TransitioningToState = newValue; 
     416                TransitioningToState_isNULL = false; 
    315417                return OK; 
    316418        } 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_RecordLog/OpenDRIM_RecordLogAccess.cpp

    r913 r1151  
    22# Linux Management Providers (LMP), OpenDRIM_RecordLogPackage provider package 
    33# Copyright (C) 2007 Ilsoo Byun <widepis@etri.re.kr ,widepis@gmail.com> 
    4 #  
     4# 
    55# This program is being developed under the "OpenDRIM" project. 
    66# The "OpenDRIM" project web page: www.opendrim.org 
    77# The "OpenDRIM" project mailing list: opendrim@googlegroups.com 
    8 #  
     8# 
    99# This program is free software; you can redistribute it and/or 
    1010# modify it under the terms of the GNU General Public License 
    1111# as published by the Free Software Foundation; version 2 
    1212# of the License. 
    13 #  
     13# 
    1414# This program is distributed in the hope that it will be useful, 
    1515# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1616# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1717# GNU General Public License for more details. 
    18 #  
     18# 
    1919# You should have received a copy of the GNU General Public License 
    2020# along with this program; if not, write to the Free Software 
     
    2525# To contributors, please leave your contact information in this section 
    2626# AND comment your changes in the source code. 
    27 #  
     27# 
    2828# Modified by <Author(s)>, <Affiliation>, <Year> 
    2929###############################################################################*/ 
     
    6161static bool isAvailableLine(string& line, vector<string>& tokens) { 
    6262        _E_; 
    63          
     63 
    6464        if (line.size() == 0 || CF_startsWith(line, "\\") || line[0] == '#') 
    6565                return false; 
     
    6969        if (tokens.size() != 2) 
    7070                return false; 
    71          
     71 
    7272        //If the first character is '-', remove it 
    7373        if (CF_startsWith(tokens[1], "-")) 
    7474                tokens[1].erase(0,1); 
    75          
     75 
    7676        vector<string> filepath_elements; 
    7777        CF_splitText(filepath_elements, tokens[1], '/'); 
     
    8282                file_container += filepath_elements[i]; 
    8383        } 
    84          
    85         if (CF_startsWith(tokens[1], "/dev/") || !CF_isExist(file_container))  
    86                 return false;   
     84 
     85        if (CF_startsWith(tokens[1], "/dev/") || !CF_isExist(file_container)) 
     86                return false; 
    8787        _L_; 
    8888        return true; 
     
    115115        ifs.close(); 
    116116        _L_; 
    117         return OK;      
     117        return OK; 
    118118} 
    119119 
     
    128128                if (!isAvailableLine(line, tokens)) 
    129129                        continue; 
    130                  
     130 
    131131                if (!instance.InstanceID_isNULL && instance.InstanceID == tokens[1]) { 
    132132                        if (OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_populate( 
     
    140140        } 
    141141        ifs.close(); 
    142         _L_;   
     142        _L_; 
    143143        return NOT_FOUND; 
    144144} 
     
    197197                                break; 
    198198                } 
    199                  
     199 
    200200                vector<unsigned short> severities; 
    201201                for (vector<unsigned short>::size_type i = 0; i < facility_count; ++i) { 
     
    249249        } 
    250250        ifs.close(); 
    251          
     251 
    252252        // rewriting the syslog configuation file. 
    253253        ofstream ofs(SYSLOG_CONFIG_FILE, ios::trunc); 
     
    285285        string line; 
    286286        CF_assert(convertLogInstanceToString(instance, line, errorMessage)); 
    287          
     287 
    288288        //Append a line. 
    289289        ofstream ofs(SYSLOG_CONFIG_FILE, ios::app); 
     
    303303                //Don't write 
    304304                if (isAvailableLine(line, tokens) && tokens[1] == instance.InstanceID) 
    305                         continue;               
     305                        continue; 
    306306                lines.push_back(line); 
    307307        } 
    308308        ifs.close(); 
    309          
     309 
    310310        //Rewrinting the syslog configuation file. 
    311311        ofstream ofs(SYSLOG_CONFIG_FILE, ios::trunc); 
     
    314314        } 
    315315        ofs.close(); 
    316          
     316 
    317317        _L_; 
    318318        return OK; 
     
    346346int OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_populate(OpenDRIM_RecordLog& instance, vector<string>& tokens, string& errorMessage) { 
    347347        _E_; 
     348 
     349        /* 
     350         * Properties to fill from profile 
     351         * + Mandatory: 
     352         * [X] InstanceID                       [KEY] 
     353         * [X] MaxNumberOfRecords 
     354         * [X] LogState 
     355         * [X] OverwritePolicy 
     356         * [X] RequestedState 
     357         * [X] EnabledState 
     358         * [X] OperationalStatus 
     359         * [X] HealthState 
     360         * [X] ElementName 
     361         * + Others: 
     362         * [X] AvailableRequestedStates 
     363         * [X] CurrentNumberOfRecords 
     364         * [X] StatusDescriptions 
     365         * [X] TimeOfLastStateChange 
     366         */ 
     367 
    348368        instance.setElementName(tokens[1]); 
    349          
     369 
    350370        // Extract the facilities and the severities 
    351371        vector<unsigned short> Facilities; 
    352372        vector<unsigned short> Severities; 
    353          
     373 
    354374        // Split into substrings using ';' as a delimiter 
    355375        vector<string> facility_severity; 
     
    385405        instance.setFacility(Facilities); 
    386406        instance.setSeverity(Severities); 
    387          
     407 
    388408        string time; 
    389409        CF_assert(CF_lastModified(tokens[1], time, errorMessage)); 
    390410        instance.setTimeOfLastStateChange(time); 
    391          
     411 
    392412        string record_count, stdout, stderr; 
    393413        CF_assert(CF_runCommand("cat "+instance.InstanceID+" | wc -l", stdout, stderr, errorMessage)); 
    394414        instance.setCurrentNumberOfRecords(atoi(stdout.c_str())); 
    395          
     415 
    396416        instance.setMaxNumberOfRecords(0); 
    397417        instance.setOverwritePolicy(7); 
     
    400420        status.push_back(2); 
    401421        instance.setOperationalStatus(status); 
     422 
     423        instance.setLogState(LS_NOT_APPLICABLE); 
     424        instance.setEnabledState(ES_NOT_APPLICABLE); 
     425        instance.setRequestedState(RS_NOT_APPLICABLE); 
    402426        _L_; 
    403427        return OK; 
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_RecordLog/OpenDRIM_RecordLogProvider.cpp

    r841 r1151  
    169169                return rc; 
    170170        } 
    171         CMPIInstance* _ci = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIInstance(_broker, instance); 
    172         CMReturnInstance(rslt, _ci); 
     171        CMPIObjectPath* _cop = OpenDRIM_RecordLogPackage_OpenDRIM_RecordLog_toCMPIObjectPath(_broker, instance); 
     172        CMReturnObjectPath(rslt, _cop); 
    173173        CMReturnDone(rslt); 
    174174        _L_; 
     
    200200} 
    201201 
    202 //CMPIAcessor - exmaple implementation 
     202//CMPIAcessor - example implementation 
    203203static CMPIData accessor(const char* propertyName, void* param) { 
    204204        CMPIInstance* inst = (CMPIInstance*) param;      
  • Linux_Management_Providers/Record_Log/trunk/OpenDRIM_RecordLog/cmpiOpenDRIM_RecordLog.cpp

    r836 r1151  
    7474                ci.setProperty("HealthState", instance.HealthState); 
    7575 
     76        if (!instance.PrimaryStatus_isNULL) 
     77                ci.setProperty("PrimaryStatus", instance.PrimaryStatus); 
     78 
     79        if (!instance.DetailedStatus_isNULL) 
     80&