示例#1
0
 def run(self, connection, max_end_time):
     if "deployment_data" not in self.parameters:
         return connection
     if self.parameters["deployment_data"].get("installer_extra_cmd"):
         if self.parameters.get("os") == "debian_installer":
             add_late_command(
                 self.get_namespace_data(action="download-action",
                                         label="preseed",
                                         key="file"),
                 self.parameters["deployment_data"]["installer_extra_cmd"],
             )
         if self.parameters.get("os") == "centos_installer":
             ip_addr = dispatcher_ip(self.job.parameters["dispatcher"])
             overlay = self.get_namespace_data(action="download-action",
                                               label="file",
                                               key="overlay")
             substitutions = {
                 "{OVERLAY_URL}": "tftp://" + ip_addr + "/" + overlay
             }
             post_command = substitute(
                 [
                     self.parameters["deployment_data"]
                     ["installer_extra_cmd"]
                 ],
                 substitutions,
             )
             add_to_kickstart(
                 self.get_namespace_data(action="download-action",
                                         label="preseed",
                                         key="file"),
                 post_command[0],
             )
     return connection
示例#2
0
 def run(self, connection, max_end_time, args=None):
     if 'deployment_data' not in self.parameters:
         return connection
     if self.parameters["deployment_data"].get('installer_extra_cmd', None):
         if self.parameters.get('os', None) == "debian_installer":
             add_late_command(
                 self.get_namespace_data(action='download-action',
                                         label='preseed',
                                         key='file'),
                 self.parameters["deployment_data"]["installer_extra_cmd"])
         if self.parameters.get('os', None) == "centos_installer":
             ip_addr = dispatcher_ip(self.job.parameters['dispatcher'])
             overlay = self.get_namespace_data(action='download-action',
                                               label='file',
                                               key='overlay')
             substitutions = {
                 '{OVERLAY_URL}': 'tftp://' + ip_addr + '/' + overlay
             }
             post_command = substitute([
                 self.parameters["deployment_data"]["installer_extra_cmd"]
             ], substitutions)
             add_to_kickstart(
                 self.get_namespace_data(action='download-action',
                                         label='preseed',
                                         key='file'), post_command[0])
     return connection
示例#3
0
 def run(self, connection, max_end_time, args=None):
     if 'deployment_data' not in self.parameters:
         return connection
     if self.parameters["deployment_data"].get('installer_extra_cmd', None):
         if self.parameters.get('os', None) == "debian_installer":
             add_late_command(self.get_namespace_data(action='download-action', label='preseed', key='file'),
                              self.parameters["deployment_data"]["installer_extra_cmd"])
         if self.parameters.get('os', None) == "centos_installer":
             ip_addr = dispatcher_ip(self.job.parameters['dispatcher'])
             overlay = self.get_namespace_data(
                 action='download-action', label='file', key='overlay')
             substitutions = {
                 '{OVERLAY_URL}': 'tftp://' + ip_addr + '/' + overlay
             }
             post_command = substitute([self.parameters["deployment_data"]["installer_extra_cmd"]], substitutions)
             add_to_kickstart(self.get_namespace_data(action='download-action', label='preseed', key='file'), post_command[0])
     return connection