Esempio n. 1
0
    def test_experiment_reload(self):
        """Test reloading an experiment."""
        experiment.reload_experiment(self.api, 123, None, None)
        exp_files = {}
        self.api.reload_experiment.assert_called_with(123, exp_files)

        experiment.reload_experiment(self.api, 123, 120, 3124159)
        exp_files = {'duration': '120', 'reservation': '3124159'}
        self.api.reload_experiment.assert_called_with(123, exp_files)
Esempio n. 2
0
    def test_experiment_reload(self):
        """Test reloading an experiment."""
        experiment.reload_experiment(self.api, 123, None, None)
        exp_files = {}
        self.api.reload_experiment.assert_called_with(123, exp_files)

        experiment.reload_experiment(self.api, 123, 120, 3124159)
        exp_files = {'duration': '120', 'reservation': '3124159'}
        self.api.reload_experiment.assert_called_with(123, exp_files)
Esempio n. 3
0
def reload_experiment_parser(opts):
    """Parse namespace 'opts' object and execute requested 'reload' command."""
    user, passwd = auth.get_user_credentials(opts.username, opts.password)
    api = rest.Api(user, passwd)
    return experiment.reload_experiment(api, opts.experiment_id,
                                        opts.duration, opts.reservation)
Esempio n. 4
0
def reload_experiment_parser(opts):
    """Parse namespace 'opts' object and execute requested 'reload' command."""
    user, passwd = auth.get_user_credentials(opts.username, opts.password)
    api = rest.Api(user, passwd)
    return experiment.reload_experiment(api, opts.experiment_id, opts.duration,
                                        opts.reservation)