On 12/30/2011 04:57 AM, Wayne Xia wrote:
δΊ 2011-12-24 3:45, Chip Vincent ει:
> +1. Only a few comments...
>
> On 12/07/2011 04:21 AM, Wayne Xia wrote:
>> this patch modifies the makefiles to add new files to be compiled
>>
>> Signed-off-by: Wayne Xia<xiawenc(a)linux.vnet.ibm.com>
>> ---
>> Makefile.am | 16 ++++++++++++++--
>> libxkutil/Makefile.am | 11 +++++++++--
>> src/Makefile.am | 49 +++++++++++++++++++++++++++++++++++++++++--------
>> 3 files changed, 64 insertions(+), 12 deletions(-)
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 5f004ec..32b84df 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -63,7 +63,13 @@ MOFS = \
>> schema/EntriesInFilterList.mof \
>> schema/NestedFilterList.mof \
>> schema/AppliedFilterList.mof \
>> - schema/HostedFilterList.mof
>> + schema/HostedFilterList.mof \
>> + schema/VirtualEthernetSwitchSystem.mof \
>> + schema/VirtualEthernetSwitchSystemManagementService.mof \
>> + schema/VirtualEthernetSwitchSystemSettingData.mof \
>> + schema/EthernetPort.mof \
>> + schema/EthernetPortAllocationSettingData.mof \
>> + schema/VESSSDComponent.mof
>>
>> INTEROP_MOFS = \
>> schema/ComputerSystem.mof \
>> @@ -150,7 +156,13 @@ REGS = \
>> schema/EntriesInFilterList.registration \
>> schema/NestedFilterList.registration \
>> schema/AppliedFilterList.registration \
>> - schema/HostedFilterList.registration
>> + schema/HostedFilterList.registration \
>> + schema/VirtualEthernetSwitchSystem.registration \
>> + schema/VirtualEthernetSwitchSystemManagementService.registration \
>> + schema/VirtualEthernetSwitchSystemSettingData.registration \
>> + schema/EthernetPort.registration \
>> + schema/EthernetPortAllocationSettingData.registration \
>> + schema/VESSSDComponent.registration
>>
>> INTEROP_REGS = \
>> schema/RegisteredProfile.registration \
>> diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am
>> index f6abce5..c5ac53c 100644
>> --- a/libxkutil/Makefile.am
>> +++ b/libxkutil/Makefile.am
>> @@ -5,12 +5,19 @@ AM_CFLAGS = $(CFLAGS_STRICT) \
>> -DLIBVIRTCIM_CONF=\"@sysconfdir@/@PACKAGE@.conf\"
>>
>> noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h
>> infostore.h \
>> - pool_parsing.h acl_parsing.h
>> + pool_parsing.h acl_parsing.h \
>> + network_model.h \
> The filename network_model.* is a bit nebulous. The other file names
> seem straight forward.
>
this file is helper functions for CIM model, so different with other
files. The name is confusing I must admit.
>> + host_network_API.h host_network_basic.h host_network_helper.h \
>> + host_network_implement_cmdline.h host_network_error.h
>>
> Why not consolidate all of this into simply host_network.h/.c. I'd
> prefer a few large but related files as opposed to many very specific
> files.
I am afraid that would be a horrible C file, and it also mess the
codes at different layers resulting harder to read and modify. I think
best solution maybe creating a sub dir with makefile changing in
./libxutil. I tried that but the root Makefile seems not to enter the
sub dir.
Given the side of this code and the fact that is somewhat bypasses libvirt,
I think creating a libxkutil/network subdir is reasonable.
>> lib_LTLIBRARIES = libxkutil.la
>>
>> libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \
>> - xmlgen.c infostore.c pool_parsing.c acl_parsing.c
>> + xmlgen.c infostore.c pool_parsing.c acl_parsing.c \
>> + network_model.c \
>> + host_network_API.c host_network_basic.c host_network_helper.c \
>> + host_network_implement_cmdline.c
>> +
>> libxkutil_la_LDFLAGS = -version-info @VERSION_INFO@
>> libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \
>> @LIBUUID_LIBS@
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index e4e8aa1..b067666 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -25,7 +25,12 @@ noinst_HEADERS = profiles.h svpc_types.h \
>> Virt_ConsoleRedirectionServiceCapabilities.h \
>> Virt_KVMRedirectionSAP.h \
>> Virt_FilterList.h \
>> - Virt_FilterEntry.h
>> + Virt_FilterEntry.h \
>> + Virt_VirtualEthernetSwitchSystem.h \
>> + Virt_VirtualEthernetSwitchSystemManagementService.h \
>> + Virt_VESSSD.h \
>> + Virt_EthernetPort.h \
>> + Virt_EASD.h
>>
>> XKUADD = $(top_builddir)/libxkutil/libxkutil.la
>>
>> @@ -86,7 +91,13 @@ provider_LTLIBRARIES = libVirt_ComputerSystem.la \
>> libVirt_EntriesInFilterList.la \
>> libVirt_NestedFilterList.la \
>> libVirt_HostedFilterList.la \
>> - libVirt_AppliedFilterList.la
>> + libVirt_AppliedFilterList.la \
>> + libVirt_VirtualEthernetSwitchSystem.la \
>> + libVirt_VirtualEthernetSwitchSystemManagementService.la \
>> + libVirt_VESSSD.la \
>> + libVirt_EthernetPort.la \
>> + libVirt_EASD.la \
>> + libVirt_VESSSDComponent.la
>>
>> libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c
>> libVirt_ComputerSystem_la_DEPENDENCIES =
>> libVirt_VirtualSystemSnapshotService.la
>> @@ -117,9 +128,9 @@
>> libVirt_VirtualSystemManagementCapabilities_la_DEPENDENCIES =
>> libVirt_HostSystem
>> libVirt_VirtualSystemManagementCapabilities_la_SOURCES =
>> Virt_VirtualSystemManagementCapabilities.c
>> libVirt_VirtualSystemManagementCapabilities_la_LIBADD = -lVirt_HostSystem
>>
>> -libVirt_SystemDevice_la_DEPENDENCIES = libVirt_ComputerSystem.la
>> libVirt_Device.la
>> +libVirt_SystemDevice_la_DEPENDENCIES = libVirt_ComputerSystem.la
>> libVirt_Device.la libVirt_VirtualEthernetSwitchSystem.la
>> libVirt_EthernetPort.la
>> libVirt_SystemDevice_la_SOURCES = Virt_SystemDevice.c
>> -libVirt_SystemDevice_la_LIBADD = -lVirt_ComputerSystem -lVirt_Device
>> +libVirt_SystemDevice_la_LIBADD = -lVirt_ComputerSystem -lVirt_Device
>> -lVirt_VirtualEthernetSwitchSystem -lVirt_EthernetPort
>>
>> libVirt_VSSD_la_SOURCES = Virt_VSSD.c
>> libVirt_HostSystem_la_SOURCES = Virt_HostSystem.c
>> @@ -188,9 +199,9 @@ libVirt_VSSDComponent_la_DEPENDENCIES =
>> libVirt_VSSD.la libVirt_RASD.la
>> libVirt_VSSDComponent_la_SOURCES = Virt_VSSDComponent.c
>> libVirt_VSSDComponent_la_LIBADD = -lVirt_VSSD -lVirt_RASD
>>
>> -libVirt_SettingsDefineState_la_DEPENDENCIES = libVirt_Device.la
>> libVirt_RASD.la libVirt_VSSD.la libVirt_ComputerSystem.la
>> +libVirt_SettingsDefineState_la_DEPENDENCIES = libVirt_Device.la
>> libVirt_RASD.la libVirt_VSSD.la libVirt_ComputerSystem.la
>> libVirt_VirtualEthernetSwitchSystem.la libVirt_VESSSD.la
>> libVirt_EASD.la libVirt_EthernetPort.la
>> libVirt_SettingsDefineState_la_SOURCES = Virt_SettingsDefineState.c
>> -libVirt_SettingsDefineState_la_LIBADD = -lVirt_Device -lVirt_RASD
>> -lVirt_VSSD -lVirt_ComputerSystem
>> +libVirt_SettingsDefineState_la_LIBADD = -lVirt_Device -lVirt_RASD
>> -lVirt_VSSD -lVirt_ComputerSystem -lVirt_VirtualEthernetSwitchSystem
>> -lVirt_VESSSD -lVirt_EASD -lVirt_EthernetPort
>>
>> libVirt_ResourceAllocationFromPool_la_DEPENDENCIES =
>> libVirt_DevicePool.la libVirt_RASD.la
>> libVirt_ResourceAllocationFromPool_la_SOURCES =
>> Virt_ResourceAllocationFromPool.c
>> @@ -204,9 +215,9 @@ libVirt_HostedService_la_DEPENDENCIES =
>> libVirt_VirtualSystemManagementService.l
>> libVirt_HostedService_la_SOURCES = Virt_HostedService.c
>> libVirt_HostedService_la_LIBADD =
>> -lVirt_VirtualSystemManagementService
>> -lVirt_ResourcePoolConfigurationService -lVirt_VSMigrationService
>> -lVirt_HostSystem -lVirt_ConsoleRedirectionService
>>
>> -libVirt_ElementSettingData_la_DEPENDENCIES = libVirt_VSSD.la
>> libVirt_RASD.la
>> +libVirt_ElementSettingData_la_DEPENDENCIES = libVirt_VSSD.la
>> libVirt_RASD.la libVirt_EASD.la libVirt_VESSSD.la libVirt_EthernetPort.la
>> libVirt_ElementSettingData_la_SOURCES = Virt_ElementSettingData.c
>> -libVirt_ElementSettingData_la_LIBADD = -lVirt_VSSD -lVirt_RASD
>> +libVirt_ElementSettingData_la_LIBADD = -lVirt_VSSD -lVirt_RASD
>> -lVirt_EASD -lVirt_VESSSD -lVirt_EthernetPort
>>
>> libVirt_VSMigrationCapabilities_la_SOURCES =
>> Virt_VSMigrationCapabilities.c
>>
>> @@ -275,3 +286,25 @@ libVirt_HostedFilterList_la_LIBADD =
>> -lVirt_HostSystem -lVirt_FilterList
>> libVirt_AppliedFilterList_la_DEPENDENCIES = libVirt_Device.la
>> libVirt_FilterList.la
>> libVirt_AppliedFilterList_la_SOURCES = Virt_AppliedFilterList.c
>> libVirt_AppliedFilterList_la_LIBADD = -lVirt_Device -lVirt_FilterList
>> +
>> +libVirt_VirtualEthernetSwitchSystem_la_SOURCES =
>> Virt_VirtualEthernetSwitchSystem.c
>> +
>> +libVirt_VESSSD_la_DEPENDENCIES = libVirt_VirtualEthernetSwitchSystem.la
>> +libVirt_VESSSD_la_SOURCES = Virt_VESSSD.c
>> +libVirt_VESSSD_la_LIBADD = -lVirt_VirtualEthernetSwitchSystem
>> +
>> +libVirt_EthernetPort_la_DEPENDENCIES = libVirt_EASD.la
>> +libVirt_EthernetPort_la_SOURCES = Virt_EthernetPort.c
>> +libVirt_EthernetPort_la_LIBADD = -lVirt_EASD
>> +
>> +libVirt_EASD_la_DEPENDENCIES = libVirt_VirtualEthernetSwitchSystem.la
>> +libVirt_EASD_la_SOURCES = Virt_EASD.c
>> +libVirt_EASD_la_LIBADD = -lVirt_VirtualEthernetSwitchSystem
>> +
>> +libVirt_VirtualEthernetSwitchSystemManagementService_la_DEPENDENCIES
>> = libVirt_VirtualEthernetSwitchSystem.la libVirt_VESSSD.la
>> libVirt_EASD.la libVirt_HostSystem.la
>> libVirt_VirtualSystemManagementService.la
>> +libVirt_VirtualEthernetSwitchSystemManagementService_la_SOURCES =
>> Virt_VirtualEthernetSwitchSystemManagementService.c
>> +libVirt_VirtualEthernetSwitchSystemManagementService_la_LIBADD =
>> -lVirt_VirtualEthernetSwitchSystem -lVirt_VESSSD -lVirt_EASD
>> -lVirt_HostSystem -lVirt_VirtualSystemManagementService
>> +
>> +libVirt_VESSSDComponent_la_DEPENDENCIES = libVirt_VESSSD.la
>> libVirt_EASD.la
>> +libVirt_VESSSDComponent_la_SOURCES = Virt_VESSSDComponent.c
>> +libVirt_VESSSDComponent_la_LIBADD = -lVirt_VESSSD -lVirt_EASD
>
>
--
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent(a)linux.vnet.ibm.com