Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issue #1158 mofcomp remove of test.mof fails
The first error encountered was that in the rollback logic the instance paths are not set into instances when they are created locally. This is because the normal compile with the pyebem mof compiler does not force this. We cannot do this by forcing the Alias on every instance created in the mof to be able to remove it so the solution is to create a new MOFWBEMConnection adaption that set the path into the mof as it is created as part of the remove. The second issue found was that the property values for reference properties in associations where the value is defined by the mof compiler alias were being inserted into the instance with keybindings with no keys. Corrects this issue in mof_compiler.py; incorrect parameter on GetClass was being passed to recursive GetClass call that could result in compiler processing classes for key qualifier but the getclass with IncludeQualifiers=False meant no keys were found. Thus, reference properties in instances where value defined by alais were built with empty keybindings. Added a test to test_mof_compiler.py to assure that we are propagating key property qualifiers correctly. Adds a bash script to test mof_compiler As a temporary measure, this adds a script that executes mof_compiler multiple time with the same MOF to add the MOF to a defined server, remove it and do that a second time. This is a very limited test using a local WBEM Server and is in the manualtests group.
- Loading branch information
1 parent
02bfe9d
commit 81483d9
Showing
6 changed files
with
359 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Test mof_compiler creation and removal of a collection of MOF in | ||
# a single file | ||
# This is a very limited simplistic test. It simply runs the script | ||
# mof_compiler twice, once to build the test mof into defined server and | ||
# a second time to remove it. The only validation is that the scripts | ||
# run without error. | ||
# Further, it assumes that the WBEMServer is running, uses http, and is | ||
# at localhost.. It does this twice to confirm that everything was removed | ||
# on the first remove. | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
echo DIR = $DIR | ||
PYWBEM_ROOT_DIR=$DIR/../../ | ||
|
||
MOF_FILE=$PYWBEM_ROOT_DIR/tests/unittest/pywbem/test.mof | ||
SCHEMA=$PYWBEM_ROOT_DIR/tests/schema/mofFinal2.51.0/ | ||
SERVER_URL=http://localhost | ||
VERBOSE="" | ||
# TO get verbose output, set VERBOSE="-v" | ||
|
||
mof_compiler -s $SERVER_URL $VERBOSE -I $SCHEMA $MOF_FILE | ||
mof_compiler -s $SERVER_URL $VERBOSE -r -I $SCHEMA $MOF_FILE | ||
mof_compiler -s $SERVER_URL $VERBOSE -I $SCHEMA $MOF_FILE | ||
mof_compiler -s $SERVER_URL $VERBOSE -r -I $SCHEMA $MOF_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.