def run(self):
        org_name = self.get_option('org')
        env_name = self.get_option('environment')
        dist_name = self.get_option('name')
        dist_uuid = self.get_option('uuid')
        keyname = self.get_option('keyname')

        distributor = get_distributor(org_name, dist_name, env_name, dist_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("distributor",
                                                      distributor['id'],
                                                      keyname)

        ident = dist_uuid if dist_uuid else dist_name

        if len(response) == 0:
            print _(
                "Successfully removed Custom Information from Distributor [ %s ]"
            ) % ident
        else:
            print _(
                "Could not remove Custom Information from Distributor [ %s ]"
            ) % ident
Ejemplo n.º 2
0
    def run(self):
        org_name = self.get_option("org")
        env_name = self.get_option("environment")
        sys_name = self.get_option("name")
        sys_uuid = self.get_option("uuid")
        keyname = self.get_option("keyname")

        system = get_system(org_name, sys_name, env_name, sys_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("system", system["id"], keyname)

        ident = sys_uuid if sys_uuid else sys_name

        if response is not None:
            print _("Successfully removed Custom Information from System [ %s ]") % ident
        else:
            print _("Could not remove Custom Information from System [ %s ]") % ident
Ejemplo n.º 3
0
    def run(self):
        org_name = self.get_option('org')
        env_name = self.get_option('environment')
        dist_name = self.get_option('name')
        dist_uuid = self.get_option('uuid')
        keyname = self.get_option('keyname')

        distributor = get_distributor(org_name, dist_name, env_name, dist_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("distributor", distributor['id'], keyname)

        ident = dist_uuid if dist_uuid else dist_name

        if len(response) == 0:
            print _("Successfully removed Custom Information from Distributor [ %s ]") % ident
        else:
            print _("Could not remove Custom Information from Distributor [ %s ]") % ident
Ejemplo n.º 4
0
    def run(self):
        org_name = self.get_option('org')
        env_name = self.get_option('environment')
        sys_name = self.get_option('name')
        sys_uuid = self.get_option('uuid')
        keyname = self.get_option('keyname')

        system = get_system(org_name, sys_name, env_name, sys_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("system", system['id'], keyname)

        ident = sys_uuid if sys_uuid else sys_name

        if len(response) == 0:
            print _("Successfully removed Custom Information from System [ %s ]") % ident
        else:
            print _("Could not remove Custom Information from System [ %s ]") % ident
Ejemplo n.º 5
0
    def run(self):
        org_name = self.get_option('org')
        env_name = self.get_option('environment')
        sys_name = self.get_option('name')
        sys_uuid = self.get_option('uuid')
        keyname = self.get_option('keyname')

        system = get_system(org_name, sys_name, env_name, sys_uuid)

        custom_info_api = CustomInfoAPI()

        response = custom_info_api.remove_custom_info("system", system['id'], keyname)

        ident = sys_uuid if sys_uuid else sys_name

        if response is not None:
            print _("Successfully removed Custom Information from System [ %s ]") % ident
        else:
            print _("Could not remove Custom Information from System [ %s ]") % ident