diff --git a/docs/releases.rst b/docs/releases.rst index 6008d4ecbc..fbfed9cb4f 100644 --- a/docs/releases.rst +++ b/docs/releases.rst @@ -17,7 +17,7 @@ and clean the rest to release the resources. The :ref:`/plugins/provision/beaker` provision plugin gains support for submitting jobs on behalf of a group through -``job-group`` key. The submitting user must be a member of +``beaker-job-group`` key. The submitting user must be a member of the given job group. diff --git a/tmt/schemas/provision/beaker.yaml b/tmt/schemas/provision/beaker.yaml index 197165a113..c755c22683 100644 --- a/tmt/schemas/provision/beaker.yaml +++ b/tmt/schemas/provision/beaker.yaml @@ -49,7 +49,7 @@ properties: beaker-job-owner: type: string - job-group: + beaker-job-group: type: string required: diff --git a/tmt/steps/provision/mrack.py b/tmt/steps/provision/mrack.py index bdc7726412..20b0ed0109 100644 --- a/tmt/steps/provision/mrack.py +++ b/tmt/steps/provision/mrack.py @@ -914,9 +914,9 @@ class BeakerGuestData(tmt.steps.provision.GuestSshData): Submitting user must be a submission delegate for the ``USERNAME``. """) - job_group: Optional[str] = field( + beaker_job_group: Optional[str] = field( default=None, - option='--job-group', + option='--beaker-job-group', metavar='GROUPNAME', help=""" If set, Beaker jobs will be submitted on behalf of ``GROUPNAME``. @@ -1079,7 +1079,7 @@ class GuestBeaker(tmt.steps.provision.GuestSsh): kickstart: dict[str, str] beaker_job_owner: Optional[str] = None - job_group: Optional[str] = None + beaker_job_group: Optional[str] = None # Provided in Beaker response job_id: Optional[str] @@ -1156,7 +1156,7 @@ def _create(self, tmt_name: str) -> None: name=f'{self.image}-{self.arch}', whiteboard=self.whiteboard or tmt_name, beaker_job_owner=self.beaker_job_owner, - group=self.job_group) + group=self.beaker_job_group) try: response = self.api.create(data) @@ -1179,13 +1179,13 @@ def _create(self, tmt_name: str) -> None: if 'is not a valid group' in cause.faultString: raise ProvisionError( - f"Failed to create Beaker job, job group '{self.job_group}' " + f"Failed to create Beaker job, job group '{self.beaker_job_group}' " "was refused as unknown.") from exc if 'is not a member of group' in cause.faultString: raise ProvisionError( "Failed to create Beaker job, submitting user is not " - "a member of group '{self.job_group}'") from exc + "a member of group '{self.beaker_job_group}'") from exc raise ProvisionError('Failed to create Beaker job') from exc