Example #1
0
    def run(self):
        architecture = self.api.update(self.get_option("old_name"), self.get_option_dict("name"))

        test_foreman_record(architecture, 'architecture',
            _("Architecture [ %s ] updated.") % self.get_option("old_name"),
            _("Could not update Architecture [ %s ].") % self.get_option("old_name")
        )
Example #2
0
    def run(self):
        data = self.get_option_dict('name', 'fullname', 'dns_id')
        domain = self.api.create(data)

        test_foreman_record(domain, 'domain',
            _('Successfuly created Domain [ %s ]') % data['name'],
            _("Could not update Domain [ %s ]") % data['name']
        )
Example #3
0
 def run(self):
     resource = self.api.update(self.get_option("original_name"), self.get_option_dict())
     test_foreman_record(
         resource,
         "compute_resource",
         _("Compute resource [ %s ] updated.") % self.get_option("original_name"),
         _("Could not update compute resource [ %s ].") % self.get_option("original_name"),
     )
Example #4
0
 def run(self):
     resource = self.api.create(self.get_option_dict())
     test_foreman_record(
         resource,
         "compute_resource",
         _("Compute resource [ %s ] created.") % self.get_option("name"),
         _("Could not create compute resource [ %s ].") % self.get_option("name"),
     )
Example #5
0
    def run(self):
        domain_id = self.get_option('id')
        data = self.get_option_dict('name', 'fullname', 'dns_id')

        domain = self.api.update(domain_id, data)

        test_foreman_record(domain, 'domain',
            _('Successfuly updated Domain [ %s ]') % domain_id,
            _("Could not create Domain [ %s ]") % domain_id
        )
Example #6
0
    def run(self):
        data = self.get_option_dict('name', 'template', 'snippet', 'audit_comment',
          'template_kind_id', 'template_combinations_attributes', 'operatingsystem_ids')

        ctemplate = self.api.create(data)

        test_foreman_record(ctemplate, 'config_template',
            _("Successfully created Config Template [ %s ]") % data['name'],
            _("Could not create Config Template [ %s ]") % data['name']
        )
Example #7
0
    def run(self):
        template_id = self.get_option('id')
        data = self.get_option_dict('name', 'template', 'snippet', 'audit_comment',
          'template_kind_id', 'template_combinations_attributes', 'operatingsystem_ids')

        ctemplate = self.api.update(template_id, data)

        test_foreman_record(ctemplate, 'config_template',
            _("Successfully updated Config Template [ id = %s ]") % template_id,
            _("Could not update Config Template [ id = %s ]") % template_id
        )
Example #8
0
    def run(self):
        data = self.get_option_dict(
            "name",
            "template",
            "snippet",
            "audit_comment",
            "template_kind_id",
            "template_combinations_attributes",
            "operatingsystem_ids",
        )

        ctemplate = self.api.create(data)

        test_foreman_record(
            ctemplate,
            "config_template",
            _("Successfully created Config Template [ %s ]") % data["name"],
            _("Could not create Config Template [ %s ]") % data["name"],
        )
Example #9
0
    def run(self):
        template_id = self.get_option("id")
        data = self.get_option_dict(
            "name",
            "template",
            "snippet",
            "audit_comment",
            "template_kind_id",
            "template_combinations_attributes",
            "operatingsystem_ids",
        )

        ctemplate = self.api.update(template_id, data)

        test_foreman_record(
            ctemplate,
            "config_template",
            _("Successfully updated Config Template [ id = %s ]") % template_id,
            _("Could not update Config Template [ id = %s ]") % template_id,
        )
Example #10
0
 def run(self):
     arch = self.api.create(self.get_option_dict("name"))
     test_foreman_record(arch, 'architecture',
         _("Architecture [ %s ] created.") % self.get_option("name"),
         _("Could not create architecture [ %s ].") % self.get_option("name")
     )