From 86a07232637625234cfa5116a96fb4602619b663 Mon Sep 17 00:00:00 2001 From: Radek Novacek Date: Mon, 22 Oct 2012 13:33:49 +0200 Subject: Change project name from Cura to OpenLMI --- CMakeLists.txt | 6 +-- README | 10 ++-- cmake/modules/CuraMacros.cmake | 105 -------------------------------------- cmake/modules/OpenLMIMacros.cmake | 105 ++++++++++++++++++++++++++++++++++++++ make-release.sh | 2 +- mof/CMakeLists.txt | 2 +- mof/LMI_Account.mof | 38 +++++++------- mof/LMI_Fan.mof | 6 +-- mof/LMI_PowerManagement.mof | 12 ++--- mof/LMI_Service.mof | 2 +- mof/LMI_Software.reg | 8 +-- reg2pegasus.py | 2 +- src/CMakeLists.txt | 8 +-- src/account/CMakeLists.txt | 8 +-- src/account/macros.h | 6 +-- src/fan/CMakeLists.txt | 6 +-- src/power/CMakeLists.txt | 6 +-- src/service/CMakeLists.txt | 6 +-- src/software/cli/software.py | 4 +- src/software/setup.py | 8 +-- 20 files changed, 175 insertions(+), 175 deletions(-) delete mode 100644 cmake/modules/CuraMacros.cmake create mode 100644 cmake/modules/OpenLMIMacros.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index f32881d..a4de1a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ option(WITH-ACCOUNT "Build account provider" ON) # Set path to custom cmake modules set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) -include(CuraMacros) +include(OpenLMIMacros) find_package(PkgConfig) @@ -31,7 +31,7 @@ find_package(KonkretCMPI REQUIRED) add_subdirectory(src) add_subdirectory(mof) -install(PROGRAMS register.sh reg2pegasus.py DESTINATION share/cura-providers) -install(FILES cmake/modules/CuraMacros.cmake DESTINATION share/cmake/Modules) +install(PROGRAMS register.sh reg2pegasus.py DESTINATION share/openlmi-providers) +install(FILES cmake/modules/OpenLMIMacros.cmake DESTINATION share/cmake/Modules) install(FILES cmake/modules/FindCMPI.cmake DESTINATION share/cmake/Modules) install(FILES cmake/modules/FindKonkretCMPI.cmake DESTINATION share/cmake/Modules) diff --git a/README b/README index 46adb4e..888201b 100644 --- a/README +++ b/README @@ -1,19 +1,19 @@ ******************************************************************************* -* Cura * +* OpenLMI * ******************************************************************************* -The Cura project provides a common infrastructure for the management of Linux +The OpenLMI project provides a common infrastructure for the management of Linux systems. Capabilities include configuration, management and monitoring of -hardware, operating systems, and system services. Cura includes a set of +hardware, operating systems, and system services. OpenLMI includes a set of services that can be accessed both locally and remotely, multiple language bindings, standard APIs, and standard scripting interfaces. ******************************************************************************* -* Cura-providers * +* openlmi-providers * ******************************************************************************* -cura-providers is set of (usually) small providers (agents) that will provide +openlmi-providers is set of (usually) small providers (agents) that will provide given functionality on host system. Following providers are part of this sub-project: diff --git a/cmake/modules/CuraMacros.cmake b/cmake/modules/CuraMacros.cmake deleted file mode 100644 index 1821c7c..0000000 --- a/cmake/modules/CuraMacros.cmake +++ /dev/null @@ -1,105 +0,0 @@ - -# This macro takes name of the MOF for one provider and header files using -# konkretcmpi. It also generates provider skeleton if it doesn't exist. -# -# @param[in] MOF name of the MOF file (should be in mof/ directory of the project root) -# @param[out] CIM_PROVIDERS list of sources of the provider generated from the MOF -# @param[out] CIM_HEADERS list of header file generated from the MOF -# -macro(konkretcmpi_generate MOF CIM_PROVIDERS CIM_HEADERS) - # Check if MOF exists - set(MOF_FILE ${CMAKE_SOURCE_DIR}/mof/${MOF}) - message(STATUS "Using mof ${MOF} ${MOF_FILE}") - if (NOT EXISTS ${MOF_FILE}) - message(FATAL_ERROR "MOF file ${MOF} not found") - endif (NOT EXISTS ${MOF_FILE}) - - # Read CIM classes out of MOF file - file(READ ${MOF_FILE} MOF_CONTENT) - string(REGEX MATCHALL "class [A-Za-z_]+" CIM_CLASSESX ${MOF_CONTENT}) - set(CIM_CLASSES "") - foreach(CLASSX ${CIM_CLASSESX}) - string(REPLACE "class " "" CLASS ${CLASSX}) - set(CIM_CLASSES ${CIM_CLASSES} ${CLASS}) - endforeach(CLASSX ${CIM_CLASSESX}) - - list(LENGTH CIM_CLASSES LEN) - if (${LEN} EQUAL 0) - message(FATAL_ERROR "No class found in the MOF file ${MOF_FILE}") - else (${LEN} EQUAL 0) - # Get headers and sources names from the list of CIM classes - set(HEADERS "") - set(PROVIDERS "") - set(GENERATE_PROVIDERS "") - set(NEW_PROVIDERS "") - foreach(CLASS ${CIM_CLASSES}) - # Add generated header to the list - set(HEADERS ${HEADERS} ${CLASS}.h) - # Get name of the source file - set(PROVIDER ${CLASS}Provider.c) - # If the provider doesn't exist, generate it - if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROVIDER}) - # Part of generating command - passed to konkret - set(GENERATE_PROVIDERS ${GENERATE_PROVIDERS} -s ${CLASS}) - # List of freshly generated providers - set(NEW_PROVIDERS ${NEW_PROVIDERS} ${PROVIDER}) - endif (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROVIDER}) - # Add provider source to the list - set(PROVIDERS ${PROVIDERS} ${PROVIDER}) - endforeach(CLASS ${CIM_CLASSES}) - - # Generate headers for CIM classes - set(ENV{KONKRET_SCHEMA_DIR} "/usr/share/mof/cim-current") - execute_process(COMMAND ${KONKRETCMPI_KONKRET} - #-m /usr/share/sblim-cmpi-base/Linux_Base.mof - -m ${MOF_FILE} - ${GENERATE_PROVIDERS} - ${CIM_CLASSES} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - RESULT_VARIABLE RES - OUTPUT_VARIABLE OUT - ERROR_VARIABLE ERR - ) - - # Show error message when konkret fails - if (NOT ${RES} EQUAL 0) - message(FATAL_ERROR "KonkretCMPI failed: ${RES} ${ERR}") - endif (NOT ${RES} EQUAL 0) - - # Move pregenerated sources for providers to source directory - foreach(PROVIDER ${NEW_PROVIDERS}) - file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER} ${CMAKE_CURRENT_SOURCE_DIR}/${PROVIDER}) - endforeach(PROVIDER ${NEW_PROVIDERS}) - - # Return to caller - set(${CIM_HEADERS} ${HEADERS}) - set(${CIM_PROVIDERS} ${PROVIDERS}) - endif (${LEN} EQUAL 0) -endmacro(konkretcmpi_generate MOF PROVIDERS HEADERS) - -# This macro creates registration file from shared library -# -# @param[in] PROVIDER_NAME human-readable name of the provider -# @param[in] LIBRARY_NAME name of the library without lib prefix and .so suffix (same as for add_library) -# @param[in] MOF name of the MOF file -# @param[in] DEST destination directory where to install .reg file -# -macro(cim_registration PROVIDER_NAME LIBRARY_NAME MOF DEST) - # Create registration out of shared library - add_custom_command(TARGET ${LIBRARY_NAME} - POST_BUILD - COMMAND ${KONKRETCMPI_KONKRETREG} lib${LIBRARY_NAME}.so > LMI_${PROVIDER_NAME}.reg - COMMENT "Generating .reg file from library for ${PROVIDER_NAME}" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - # Install it - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LMI_${PROVIDER_NAME}.reg DESTINATION ${DEST}) - - # Add custom target for registration - find_file(MOF_FILE - ${MOF} - PATHS ${CMAKE_SOURCE_DIR}/mof/ - ) - add_custom_target(register-${PROVIDER_NAME} - ${CMAKE_SOURCE_DIR}/register.sh ${MOF_FILE} ${CMAKE_CURRENT_BINARY_DIR}/LMI_${PROVIDER_NAME}.reg) -endmacro(cim_registration) diff --git a/cmake/modules/OpenLMIMacros.cmake b/cmake/modules/OpenLMIMacros.cmake new file mode 100644 index 0000000..1821c7c --- /dev/null +++ b/cmake/modules/OpenLMIMacros.cmake @@ -0,0 +1,105 @@ + +# This macro takes name of the MOF for one provider and header files using +# konkretcmpi. It also generates provider skeleton if it doesn't exist. +# +# @param[in] MOF name of the MOF file (should be in mof/ directory of the project root) +# @param[out] CIM_PROVIDERS list of sources of the provider generated from the MOF +# @param[out] CIM_HEADERS list of header file generated from the MOF +# +macro(konkretcmpi_generate MOF CIM_PROVIDERS CIM_HEADERS) + # Check if MOF exists + set(MOF_FILE ${CMAKE_SOURCE_DIR}/mof/${MOF}) + message(STATUS "Using mof ${MOF} ${MOF_FILE}") + if (NOT EXISTS ${MOF_FILE}) + message(FATAL_ERROR "MOF file ${MOF} not found") + endif (NOT EXISTS ${MOF_FILE}) + + # Read CIM classes out of MOF file + file(READ ${MOF_FILE} MOF_CONTENT) + string(REGEX MATCHALL "class [A-Za-z_]+" CIM_CLASSESX ${MOF_CONTENT}) + set(CIM_CLASSES "") + foreach(CLASSX ${CIM_CLASSESX}) + string(REPLACE "class " "" CLASS ${CLASSX}) + set(CIM_CLASSES ${CIM_CLASSES} ${CLASS}) + endforeach(CLASSX ${CIM_CLASSESX}) + + list(LENGTH CIM_CLASSES LEN) + if (${LEN} EQUAL 0) + message(FATAL_ERROR "No class found in the MOF file ${MOF_FILE}") + else (${LEN} EQUAL 0) + # Get headers and sources names from the list of CIM classes + set(HEADERS "") + set(PROVIDERS "") + set(GENERATE_PROVIDERS "") + set(NEW_PROVIDERS "") + foreach(CLASS ${CIM_CLASSES}) + # Add generated header to the list + set(HEADERS ${HEADERS} ${CLASS}.h) + # Get name of the source file + set(PROVIDER ${CLASS}Provider.c) + # If the provider doesn't exist, generate it + if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROVIDER}) + # Part of generating command - passed to konkret + set(GENERATE_PROVIDERS ${GENERATE_PROVIDERS} -s ${CLASS}) + # List of freshly generated providers + set(NEW_PROVIDERS ${NEW_PROVIDERS} ${PROVIDER}) + endif (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PROVIDER}) + # Add provider source to the list + set(PROVIDERS ${PROVIDERS} ${PROVIDER}) + endforeach(CLASS ${CIM_CLASSES}) + + # Generate headers for CIM classes + set(ENV{KONKRET_SCHEMA_DIR} "/usr/share/mof/cim-current") + execute_process(COMMAND ${KONKRETCMPI_KONKRET} + #-m /usr/share/sblim-cmpi-base/Linux_Base.mof + -m ${MOF_FILE} + ${GENERATE_PROVIDERS} + ${CIM_CLASSES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + RESULT_VARIABLE RES + OUTPUT_VARIABLE OUT + ERROR_VARIABLE ERR + ) + + # Show error message when konkret fails + if (NOT ${RES} EQUAL 0) + message(FATAL_ERROR "KonkretCMPI failed: ${RES} ${ERR}") + endif (NOT ${RES} EQUAL 0) + + # Move pregenerated sources for providers to source directory + foreach(PROVIDER ${NEW_PROVIDERS}) + file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER} ${CMAKE_CURRENT_SOURCE_DIR}/${PROVIDER}) + endforeach(PROVIDER ${NEW_PROVIDERS}) + + # Return to caller + set(${CIM_HEADERS} ${HEADERS}) + set(${CIM_PROVIDERS} ${PROVIDERS}) + endif (${LEN} EQUAL 0) +endmacro(konkretcmpi_generate MOF PROVIDERS HEADERS) + +# This macro creates registration file from shared library +# +# @param[in] PROVIDER_NAME human-readable name of the provider +# @param[in] LIBRARY_NAME name of the library without lib prefix and .so suffix (same as for add_library) +# @param[in] MOF name of the MOF file +# @param[in] DEST destination directory where to install .reg file +# +macro(cim_registration PROVIDER_NAME LIBRARY_NAME MOF DEST) + # Create registration out of shared library + add_custom_command(TARGET ${LIBRARY_NAME} + POST_BUILD + COMMAND ${KONKRETCMPI_KONKRETREG} lib${LIBRARY_NAME}.so > LMI_${PROVIDER_NAME}.reg + COMMENT "Generating .reg file from library for ${PROVIDER_NAME}" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + # Install it + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LMI_${PROVIDER_NAME}.reg DESTINATION ${DEST}) + + # Add custom target for registration + find_file(MOF_FILE + ${MOF} + PATHS ${CMAKE_SOURCE_DIR}/mof/ + ) + add_custom_target(register-${PROVIDER_NAME} + ${CMAKE_SOURCE_DIR}/register.sh ${MOF_FILE} ${CMAKE_CURRENT_BINARY_DIR}/LMI_${PROVIDER_NAME}.reg) +endmacro(cim_registration) diff --git a/make-release.sh b/make-release.sh index 296baff..aee045e 100755 --- a/make-release.sh +++ b/make-release.sh @@ -1,6 +1,6 @@ #!/bin/sh -PKG="cura-providers" +PKG="openlmi-providers" if [ $# -lt 1 ]; then diff --git a/mof/CMakeLists.txt b/mof/CMakeLists.txt index f51976a..cfdc181 100644 --- a/mof/CMakeLists.txt +++ b/mof/CMakeLists.txt @@ -2,5 +2,5 @@ file(GLOB MOFS *.mof) foreach(MOF ${MOFS}) - install(FILES ${MOF} DESTINATION share/cura-providers/) + install(FILES ${MOF} DESTINATION share/openlmi-providers/) endforeach(MOF ${MOFS}) diff --git a/mof/LMI_Account.mof b/mof/LMI_Account.mof index 5dc6f11..2ca4f5e 100644 --- a/mof/LMI_Account.mof +++ b/mof/LMI_Account.mof @@ -20,7 +20,7 @@ // [ Description("Class representing Linux Account"), - Provider("cmpi:cmpiCura_Account") + Provider("cmpi:cmpiLMI_Account") ] class LMI_Account: CIM_Account { @@ -48,7 +48,7 @@ class LMI_Account: CIM_Account [ Description("LMI_AccountManagementService creates, manages, and if necessary " "destroys Linux Accounts on behalf of other SecuritySerices."), - Provider("cmpi:cmpiCura_Account") + Provider("cmpi:cmpiLMI_Account") ] class LMI_AccountManagementService: CIM_SecurityService // It would be good to inherit from CIM_AccountManagementService @@ -127,13 +127,13 @@ class LMI_AccountManagementService: CIM_SecurityService }; -[ Provider("cmpi:cmpiCura_Account") ] +[ Provider("cmpi:cmpiLMI_Account") ] class LMI_AccountManagementCapabilities: CIM_AccountManagementCapabilities { }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_AccountOnSystem: CIM_AccountOnSystem { [ Override("GroupComponent"), Min(1), Max(1), @@ -145,23 +145,23 @@ class LMI_AccountOnSystem: CIM_AccountOnSystem LMI_Account REF PartComponent; }; -[ Provider("cmpi:cmpiCura_Account") ] +[ Provider("cmpi:cmpiLMI_Account") ] class LMI_AccountSettingData: CIM_AccountSettingData { }; -[ Provider("cmpi:cmpiCura_Account") ] +[ Provider("cmpi:cmpiLMI_Account") ] class LMI_Identity: CIM_Identity { }; -[ Provider("cmpi:cmpiCura_Account") ] +[ Provider("cmpi:cmpiLMI_Account") ] class LMI_Group: CIM_Group { }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_AssignedAccountIdentity: CIM_AssignedIdentity { [ Override("IdentityInfo"), @@ -174,7 +174,7 @@ class LMI_AssignedAccountIdentity: CIM_AssignedIdentity }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_AssignedGroupIdentity: CIM_AssignedIdentity { [ Override("IdentityInfo"), @@ -187,7 +187,7 @@ class LMI_AssignedGroupIdentity: CIM_AssignedIdentity }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_AccountManagementServiceCapabilities: CIM_ElementCapabilities { [ Override("ManagedElement"), @@ -199,14 +199,14 @@ class LMI_AccountManagementServiceCapabilities: CIM_ElementCapabilities LMI_AccountManagementCapabilities REF Capabilities; }; -[ Provider("cmpi:cmpiCura_Account") ] +[ Provider("cmpi:cmpiLMI_Account") ] class LMI_EnabledAccountCapabilities: CIM_EnabledLogicalElementCapabilities { }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_AccountCapabilities: CIM_ElementCapabilities { [ Override("ManagedElement"), @@ -220,7 +220,7 @@ class LMI_AccountCapabilities: CIM_ElementCapabilities }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_AccountManagementServiceSettingData: CIM_ElementSettingData { [ Override("ManagedElement"), @@ -233,7 +233,7 @@ class LMI_AccountManagementServiceSettingData: CIM_ElementSettingData }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_HostedAccountManagementService: CIM_HostedService { [ Override("Antecedent"), @@ -246,7 +246,7 @@ class LMI_HostedAccountManagementService: CIM_HostedService }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_MemberOfGroup: CIM_MemberOfCollection { [ Override("Collection"), @@ -259,7 +259,7 @@ class LMI_MemberOfGroup: CIM_MemberOfCollection }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_OwningGroup: CIM_OwningCollectionElement { [ Override("OwningElement"), @@ -272,7 +272,7 @@ class LMI_OwningGroup: CIM_OwningCollectionElement }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_ServiceAffectsIdentity: CIM_ServiceAffectsElement { [ Override("AffectingElement"), @@ -285,7 +285,7 @@ class LMI_ServiceAffectsIdentity: CIM_ServiceAffectsElement }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_SettingsDefineManagementCapabilities: CIM_SettingsDefineCapabilities { [ Override("GroupComponent"), @@ -298,7 +298,7 @@ class LMI_SettingsDefineManagementCapabilities: CIM_SettingsDefineCapabilities }; [ Association, - Provider("cmpi:cmpiCura_Account") ] + Provider("cmpi:cmpiLMI_Account") ] class LMI_SettingsDefineAccountCapabilities: CIM_SettingsDefineCapabilities { [ Override("GroupComponent"), diff --git a/mof/LMI_Fan.mof b/mof/LMI_Fan.mof index caee936..25ce0a8 100644 --- a/mof/LMI_Fan.mof +++ b/mof/LMI_Fan.mof @@ -15,7 +15,7 @@ * along with this program; if not, see . */ -[ Provider("cmpi:cmpiCura_Fan") ] +[ Provider("cmpi:cmpiLMI_Fan") ] class LMI_Fan: CIM_Fan { [ Key, Override("DeviceID"), @@ -81,7 +81,7 @@ class LMI_Fan: CIM_Fan boolean MaxAlarm; }; -[ Provider("cmpi:cmpiCura_Fan") ] +[ Provider("cmpi:cmpiLMI_Fan") ] class LMI_FanSensor: CIM_NumericSensor { [ Key, Override("DeviceID"), @@ -95,7 +95,7 @@ class LMI_FanSensor: CIM_NumericSensor }; [ Association, - Provider("cmpi:cmpiCura_Fan") ] + Provider("cmpi:cmpiLMI_Fan") ] class LMI_FanAssociatedSensor: CIM_AssociatedSensor { [ Override("Antecedent") ] diff --git a/mof/LMI_PowerManagement.mof b/mof/LMI_PowerManagement.mof index b7a3cba..d59824f 100644 --- a/mof/LMI_PowerManagement.mof +++ b/mof/LMI_PowerManagement.mof @@ -15,13 +15,13 @@ * along with this program; if not, see . */ -[ Provider("cmpi:cmpiCura_PowerManagement") ] +[ Provider("cmpi:cmpiLMI_PowerManagement") ] class LMI_PowerManagementService: CIM_PowerManagementService { }; [ Association, - Provider("cmpi:cmpiCura_PowerManagement") ] + Provider("cmpi:cmpiLMI_PowerManagement") ] class LMI_AssociatedPowerManagementService: CIM_AssociatedPowerManagementService { [ Override("ServiceProvided"), Max(1), @@ -33,13 +33,13 @@ class LMI_AssociatedPowerManagementService: CIM_AssociatedPowerManagementService CIM_ComputerSystem REF UserOfService; }; -[ Provider("cmpi:cmpiCura_PowerManagement") ] +[ Provider("cmpi:cmpiLMI_PowerManagement") ] class LMI_PowerManagementCapabilities: CIM_PowerManagementCapabilities { }; [ Association, - Provider("cmpi:cmpiCura_PowerManagement") ] + Provider("cmpi:cmpiLMI_PowerManagement") ] class LMI_HostedPowerManagementService: CIM_HostedService { [ Override("Antecedent"), Min(1), Max(1), @@ -51,12 +51,12 @@ class LMI_HostedPowerManagementService: CIM_HostedService LMI_PowerManagementService REF Dependent; }; -[ Provider("cmpi:cmpiCura_PowerManagement") ] +[ Provider("cmpi:cmpiLMI_PowerManagement") ] class LMI_ConcreteJob: CIM_ConcreteJob { }; -[ Provider("cmpi:cmpiCura_PowerManagement") ] +[ Provider("cmpi:cmpiLMI_PowerManagement") ] class LMI_ElementCapabilities: CIM_ElementCapabilities { [ Key, Min(1), Description("The managed element.") ] diff --git a/mof/LMI_Service.mof b/mof/LMI_Service.mof index 86b469f..2adab5d 100644 --- a/mof/LMI_Service.mof +++ b/mof/LMI_Service.mof @@ -16,7 +16,7 @@ */ [ Description("Class representing Linux Service"), - Provider("cmpi:cmpiCura_Service") ] + Provider("cmpi:cmpiLMI_Service") ] class LMI_Service: CIM_Service { [ Override("StartService") ] diff --git a/mof/LMI_Software.reg b/mof/LMI_Software.reg index 019befb..4e02120 100644 --- a/mof/LMI_Software.reg +++ b/mof/LMI_Software.reg @@ -1,23 +1,23 @@ [LMI_SoftwarePackage] - provider: /usr/lib/python2.7/site-packages/cura/software/LMI_SoftwarePackage.py + provider: /usr/lib/python2.7/site-packages/openlmi/software/LMI_SoftwarePackage.py location: pyCmpiProvider type: instance method namespace: root/cimv2 [LMI_SoftwareInstalledPackage] - provider: /usr/lib/python2.7/site-packages/cura/software/LMI_SoftwareInstalledPackage.py + provider: /usr/lib/python2.7/site-packages/openlmi/software/LMI_SoftwareInstalledPackage.py location: pyCmpiProvider type: instance association method namespace: root/cimv2 [LMI_SoftwareFileCheck] - provider: /usr/lib/python2.7/site-packages/cura/software/LMI_SoftwareFileCheck.py + provider: /usr/lib/python2.7/site-packages/openlmi/software/LMI_SoftwareFileCheck.py location: pyCmpiProvider type: instance method namespace: root/cimv2 [LMI_SoftwarePackageChecks] - provider: /usr/lib/python2.7/site-packages/cura/software/LMI_SoftwarePackageChecks.py + provider: /usr/lib/python2.7/site-packages/openlmi/software/LMI_SoftwarePackageChecks.py location: pyCmpiProvider type: instance association namespace: root/cimv2 diff --git a/reg2pegasus.py b/reg2pegasus.py index 8f77434..c9e6b32 100644 --- a/reg2pegasus.py +++ b/reg2pegasus.py @@ -27,7 +27,7 @@ def define_module(location): Version = "0.0.1"; InterfaceType = "CMPI"; InterfaceVersion = "2.0.0"; - ModuleGroupName = "cura-providers"; + ModuleGroupName = "lmi-providers"; }; """ % { 'location': location } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6532df3..ff3bf58 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,13 +1,13 @@ include_directories(.) -add_library(curacommon SHARED +add_library(openlmicommon SHARED globals.c ) -set_target_properties(curacommon PROPERTIES SOVERSION 0.0.1) +set_target_properties(openlmicommon PROPERTIES SOVERSION 0.0.1) -install(TARGETS curacommon DESTINATION lib${LIB_SUFFIX}) -install(FILES globals.h DESTINATION include/cura) +install(TARGETS openlmicommon DESTINATION lib${LIB_SUFFIX}) +install(FILES globals.h DESTINATION include/openlmi) if (WITH-FAN) add_subdirectory(fan) diff --git a/src/account/CMakeLists.txt b/src/account/CMakeLists.txt index ecb0945..7aa517e 100644 --- a/src/account/CMakeLists.txt +++ b/src/account/CMakeLists.txt @@ -1,6 +1,6 @@ set(PROVIDER_NAME Account) -set(LIBRARY_NAME cmpiCura_${PROVIDER_NAME}) +set(LIBRARY_NAME cmpiLMI_${PROVIDER_NAME}) set(MOF LMI_Account.mof) set(provider_SRCS @@ -24,15 +24,15 @@ pkg_check_modules(LIBUSER REQUIRED libuser) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS}) -target_link_libraries(${LIBRARY_NAME} curacommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES}) +target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES}) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${LIBUSER_INCLUDE_DIRS}) -target_link_libraries(${LIBRARY_NAME} curacommon ${KONKRETCMPI_LIBRARIES} ${LIBUSER_LIBRARIES}) +target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${LIBUSER_LIBRARIES}) # Create registration file -cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/cura-providers) +cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers) install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/) diff --git a/src/account/macros.h b/src/account/macros.h index 91fa2aa..9428c86 100644 --- a/src/account/macros.h +++ b/src/account/macros.h @@ -2,9 +2,9 @@ #define MACROS_H /* Few global names of instances */ -#define LAMSNAME "Cura Linux Users Account Management Service" -#define LAMCNAME "Cura Linux Users Account Management Capabilities" -#define LEACNAME "Cura Linux Account Capabilities" +#define LAMSNAME "OpenLMI Linux Users Account Management Service" +#define LAMCNAME "OpenLMI Linux Users Account Management Capabilities" +#define LEACNAME "OpenLMI Linux Account Capabilities" /* Organization ID. Used for InstaceIDs */ #define ORGID "LMI" diff --git a/src/fan/CMakeLists.txt b/src/fan/CMakeLists.txt index 16c6e18..7cb801a 100644 --- a/src/fan/CMakeLists.txt +++ b/src/fan/CMakeLists.txt @@ -1,6 +1,6 @@ set(PROVIDER_NAME Fan) -set(LIBRARY_NAME cmpiCura_${PROVIDER_NAME}) +set(LIBRARY_NAME cmpiLMI_${PROVIDER_NAME}) set(MOF LMI_Fan.mof) set(provider_SRCS @@ -21,10 +21,10 @@ add_library(${LIBRARY_NAME} SHARED include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR}) -target_link_libraries(${LIBRARY_NAME} curacommon ${KONKRETCMPI_LIBRARIES} sensors) +target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} sensors) # Create registration file -cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/cura-providers) +cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers) install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/) diff --git a/src/power/CMakeLists.txt b/src/power/CMakeLists.txt index 7b1ddc0..73725d3 100644 --- a/src/power/CMakeLists.txt +++ b/src/power/CMakeLists.txt @@ -1,6 +1,6 @@ set(PROVIDER_NAME PowerManagement) -set(LIBRARY_NAME cmpiCura_${PROVIDER_NAME}) +set(LIBRARY_NAME cmpiLMI_${PROVIDER_NAME}) set(MOF LMI_PowerManagement.mof) set(provider_SRCS @@ -23,7 +23,7 @@ pkg_check_modules(GLIB REQUIRED glib-2.0) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS}) -target_link_libraries(${LIBRARY_NAME} curacommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES}) +target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES}) # Check if we have upower and link it pkg_check_modules(UPOWER upower-glib) @@ -40,7 +40,7 @@ if (${SYSTEMCTL_FOUND}) endif (${SYSTEMCTL_FOUND}) # Create registration file -cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/cura-providers) +cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers) install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/) diff --git a/src/service/CMakeLists.txt b/src/service/CMakeLists.txt index 46c3e71..c0f236f 100644 --- a/src/service/CMakeLists.txt +++ b/src/service/CMakeLists.txt @@ -1,6 +1,6 @@ set(PROVIDER_NAME Service) -set(LIBRARY_NAME cmpiCura_${PROVIDER_NAME}) +set(LIBRARY_NAME cmpiLMI_${PROVIDER_NAME}) set(MOF LMI_Service.mof) set(provider_SRCS @@ -19,10 +19,10 @@ add_library(${LIBRARY_NAME} SHARED ) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR}) -target_link_libraries(${LIBRARY_NAME} curacommon ${KONKRETCMPI_LIBRARIES}) +target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES}) # Create registration file -cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/cura-providers) +cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers) install(PROGRAMS util/servicedisc.sh util/serviceutil.sh DESTINATION libexec) diff --git a/src/software/cli/software.py b/src/software/cli/software.py index a8aba16..eaedc7d 100755 --- a/src/software/cli/software.py +++ b/src/software/cli/software.py @@ -175,7 +175,7 @@ def list_files(conn, package): if __name__ == '__main__': parser = argparse.ArgumentParser(prog='software', - description=("CLI tool for testing cura software providers." + description=("CLI tool for testing OpenLMI software providers." " With this tool you are able to install, update," " remove and verify particular package."), conflict_handler="resolve") @@ -194,7 +194,7 @@ if __name__ == '__main__': help="User password.") parser.add_argument('-d', '--debug', action='store_true', default=False, help="Print debugging informations.") - subpars = parser.add_subparsers(help="Action to make on cura providers.") + subpars = parser.add_subparsers(help="Action to make on OpenLMI providers.") parse_install = subpars.add_parser('install', help="Install specific available package.") diff --git a/src/software/setup.py b/src/software/setup.py index 6a86bea..cd60cc0 100644 --- a/src/software/setup.py +++ b/src/software/setup.py @@ -1,13 +1,13 @@ from distutils.core import setup setup( - name='cura-software', + name='openlmi-software', description='Software Management providers', author='Michal Minar', author_email='miminar@redhat.com', - url='https://fedorahosted.org/cura/', + url='https://fedorahosted.org/openlmi/', version='0.4', - package_dir={'cura.software': 'providers'}, - packages=['cura.software', 'cura.software.util'], + package_dir={'openlmi.software': 'providers'}, + packages=['openlmi.software', 'openlmi.software.util'], classifiers=[ 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', 'Operating System :: POSIX :: Linux', -- cgit