/vmdb/app/models/miq_ae_yaml_export.rb def write_domain_file(domain_obj) if @options['export_as'].present? saved_domain = domain_obj.name domain_obj.name = @options['export_as'] end envelope_hash = setup_envelope(domain_obj, DOMAIN_OBJ_TYPE).to_yaml write_export_file('fqname' => swap_domain_name(domain_obj.name), 'output_filename' => DOMAIN_YAML_FILENAME, 'export_data' => envelope_hash, 'created_on' => domain_obj.created_on, 'updated_on' => domain_obj.updated_on) domain_obj.name = saved_domain if saved_domain end The following change to app/models/miq_ae_yaml_export.rb seems to fix the issue: def write_domain_file(domain_obj) #if @options['export_as'].present? # saved_domain = domain_obj.name # domain_obj.name = @options['export_as'] #end envelope_hash = setup_envelope(domain_obj, DOMAIN_OBJ_TYPE).to_yaml write_export_file('fqname' => swap_domain_name(domain_obj.name), 'output_filename' => DOMAIN_YAML_FILENAME, 'export_data' => envelope_hash, 'created_on' => domain_obj.created_on, 'updated_on' => domain_obj.updated_on) #domain_obj.name = saved_domain if saved_domain end
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/9c6d3f9a2f69500b3496ea53ec56baaf30e0b319 commit 9c6d3f9a2f69500b3496ea53ec56baaf30e0b319 Author: Madhu Kanoor <mkanoor> AuthorDate: Wed Apr 15 10:05:44 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Wed Apr 15 10:05:44 2015 -0400 Export as issues Export as could not handle names which start with the same string as the original name. https://bugzilla.redhat.com/show_bug.cgi?id=1211392 vmdb/app/models/miq_ae_yaml_export.rb | 2 +- vmdb/spec/models/miq_ae_yaml_import_export_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
# rpm -qa cfme cfme-5.4.0.0.24-1.el6cf.x86_64 # bin/rake evm:automate:export DOMAIN=aaa EXPORT_AS=aaaaaa No export location specified. Exporting domain: aaa to: ./aaa.zip # mv aaa.zip aaa1.zip # bin/rake evm:automate:export DOMAIN=aaa EXPORT_AS=aa No export location specified. Exporting domain: aaa to: ./aaa.zip # mv aaa.zip aaa2.zip # less aaa1.zip Archive: aaa1.zip Zip file size: 3022 bytes, number of entries: 15 drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:39 aaaaaa/ -rw-r--r-- 5.2 unx 1189 t- defN 15-Apr-30 09:39 aaaaaa/.manifest.yaml -rw-r--r-- 5.2 unx 169 t- defN 15-Apr-30 09:39 aaaaaa/__domain__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:39 aaaaaa/a/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:39 aaaaaa/a/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:39 aaaaaa/a/b/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:39 aaaaaa/a/b/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/d/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/d/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/d/e/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/d/e/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/d/e/aasdf.class/ -rw-r--r-- 5.2 unx 190 t- defN 15-Apr-30 09:39 aaaaaa/a/b/c/d/e/aasdf.class/__class__.yaml 15 files, 2318 bytes uncompressed, 1176 bytes compressed: 49.3% # less aaa2.zip Archive: aaa2.zip Zip file size: 2903 bytes, number of entries: 15 drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:40 aa/ -rw-r--r-- 5.2 unx 1189 t- defN 15-Apr-30 09:40 aa/.manifest.yaml -rw-r--r-- 5.2 unx 165 t- defN 15-Apr-30 09:40 aa/__domain__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:40 aa/a/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:40 aa/a/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:40 aa/a/b/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:40 aa/a/b/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:40 aa/a/b/c/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:40 aa/a/b/c/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:40 aa/a/b/c/d/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:40 aa/a/b/c/d/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:40 aa/a/b/c/d/e/ -rw-r--r-- 5.2 unx 154 t- defN 15-Apr-30 09:40 aa/a/b/c/d/e/__namespace__.yaml drwxr-xr-x 5.2 unx 0 t- defN 15-Apr-30 09:40 aa/a/b/c/d/e/aasdf.class/ -rw-r--r-- 5.2 unx 190 t- defN 15-Apr-30 09:40 aa/a/b/c/d/e/aasdf.class/__class__.yaml 15 files, 2314 bytes uncompressed, 1177 bytes compressed: 49.1% Is this enough for proving that the fix works?
Yes, that should be good enough
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1100.html