~smoser/simplestreams/trunk

« back to all changes in this revision

Viewing changes to tools/sstream-mirror-glance

  • Committer: Scott Moser
  • Date: 2016-02-01 09:18:28 UTC
  • mfrom: (415.2.10 simplestreams)
  • Revision ID: smoser@ubuntu.com-20160201091828-ln5r30e4yfn8geg2
Enable better support for multi-hypervisor regions in OpenStack

1) Determine correct disk format.
2) Set hypervisor_type on images based on ftype field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
                        "Expressions are key[!]=literal_string "
105
105
                        "or key[!]~regexp.")
106
106
 
 
107
    parser.add_argument('--hypervisor-mapping', action='store_true', default=False,
 
108
                        help="Set hypervisor_type attribute on stored images. "
 
109
                        "This is useful in OpenStack Clouds which use multiple "
 
110
                        "hypervisor types with in a single region.")
 
111
 
107
112
    args = parser.parse_args()
108
113
 
109
114
    modify_hook = None
113
118
    mirror_config = {'max_items': args.max, 'keep_items': args.keep,
114
119
                     'cloud_name': args.cloud_name,
115
120
                     'modify_hook': modify_hook,
116
 
                     'item_filters': args.item_filters}
 
121
                     'item_filters': args.item_filters,
 
122
                     'hypervisor_mapping': args.hypervisor_mapping}
117
123
 
118
124
    (mirror_url, args.path) = util.path_from_mirror_url(args.source_mirror,
119
125
                                                        args.path)