Пример #1
0
 def run(self, connection, args=None):
     if not self.data['compress-overlay'].get('output'):
         raise RuntimeError("Unable to find the overlay")
     guest_dir = self.mkdtemp()
     guest_file = os.path.join(guest_dir, self.guest_filename)
     self.set_common_data('guest', 'filename', guest_file)
     blkid = prepare_guestfs(
         guest_file, self.data['compress-overlay'].get('output'),
         self.job.device['actions']['deploy']['methods']['image']['parameters']['guest']['size'])
     self.results = {'success': blkid}
     self.set_common_data('guest', 'UUID', blkid)
     return connection
Пример #2
0
 def run(self, connection, args=None):
     if not self.data['compress-overlay'].get('output'):
         raise RuntimeError("Unable to find the overlay")
     guest_dir = self.mkdtemp()
     guest_file = os.path.join(guest_dir, self.guest_filename)
     self.set_common_data('guest', 'filename', guest_file)
     blkid = prepare_guestfs(
         guest_file, self.data['compress-overlay'].get('output'),
         self.job.device['actions']['deploy']['methods']['image']
         ['parameters']['guest']['size'])
     self.results = {'success': blkid}
     return connection
Пример #3
0
 def run(self, connection, max_end_time, args=None):
     overlay_file = self.get_namespace_data(action='compress-overlay',
                                            label='output',
                                            key='file')
     if not overlay_file:
         raise LAVABug("Unable to find the overlay")
     self.logger.debug("Overlay: %s", overlay_file)
     guest_dir = self.mkdtemp()
     guest_file = os.path.join(guest_dir, self.guest_filename)
     self.set_namespace_data(action=self.name,
                             label='guest',
                             key='filename',
                             value=guest_file)
     blkid = prepare_guestfs(
         guest_file, overlay_file, self.job.device['actions']['deploy']
         ['methods']['image']['parameters']['guest']['size'])
     self.results = {'success': blkid}
     self.set_namespace_data(action=self.name,
                             label='guest',
                             key='UUID',
                             value=blkid)
     return connection