1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-04-01 06:50:25 +03:00

Merge branch 'master' of git.opennebula.org:one

This commit is contained in:
Carlos Martín 2012-01-11 16:47:51 +01:00
commit bd0c4cdf90
2 changed files with 17 additions and 4 deletions

View File

@ -64,9 +64,15 @@ echo "$IMAGE_REPOSITORY_PATH/`echo $CANONICAL_MD5 | cut -d ' ' -f1`"
}
function fs_du {
SIZE=`du -sk "$1" | cut -f1`
if [ -d "$1" ]; then
SIZE=`du -s "$1" | cut -f1`
error=$?
else
SIZE=`stat -c %s "$1"`
error=$?
fi
if [ $? -ne 0 ]; then
if [ $error -ne 0 ]; then
SIZE=0
else
SIZE=$(($SIZE/1024))

View File

@ -319,8 +319,15 @@ int LibVirtDriver::deployment_description_vmware(
script = nic->vector_value("SCRIPT");
model = nic->vector_value("MODEL");
bridge = "one-pg-";
bridge.append(network_id);
if (vm->get_vnm_mad() == LibVirtDriver::vmware_vnm_name)
{
bridge = "one-pg-";
bridge.append(network_id);
}
else
{
bridge = nic->vector_value("BRIDGE");
}
file << "\t\t<interface type='bridge'>" << endl;
file << "\t\t\t<source bridge='" << bridge << "'/>" << endl;