コード例 #1
0
    def __init__(self, context, action):
        description = _('manage consumer package %s schedules' % action)
        super(YumConsumerSchedulesSection, self).__init__('schedules', description)

        self.add_command(consumer_content.ConsumerContentListScheduleCommand(context, action))
        self.add_command(YumConsumerContentCreateScheduleCommand(context, action, TYPE_ID_RPM))
        self.add_command(consumer_content.ConsumerContentDeleteScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentUpdateScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentNextRunCommand(context, action))
コード例 #2
0
    def test_rpm_update_schedule_command(self):
        for action in SCHEDULE_INSTALL_ACTIONS:
            command = consumer_content.ConsumerContentUpdateScheduleCommand(
                self.context, action=action)

            self.assertTrue(isinstance(command, UpdateScheduleCommand))
            self.assertTrue(OPTION_CONSUMER_ID in command.options)
            self.assertEqual(command.name, 'update')
            self.assertTrue(action in command.description)
コード例 #3
0
ファイル: errata.py プロジェクト: ulif/pulp_rpm
    def __init__(self, context, action):
        description = _('manage consumer errata %s schedules' % action)
        super(self.__class__, self).__init__('schedules', description)

        self.add_command(consumer_content.ConsumerContentListScheduleCommand(context, action))
        self.add_command(YumConsumerContentCreateScheduleCommand(context, action, TYPE_ID_ERRATA))
        self.add_command(consumer_content.ConsumerContentDeleteScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentUpdateScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentNextRunCommand(context, action))
コード例 #4
0
 def test_update_schedule(self):
     try:
         consumer_content.ConsumerContentUpdateScheduleCommand(
             self.mock_context, self.action)
     except Exception, e:
         self.fail(str(e))