feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Command group for Dataplex Environment Resource."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Environments(base.Group):
"""Manage Dataplex Environments."""
category = base.DATA_ANALYTICS_CATEGORY

View File

@@ -0,0 +1,60 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""`gcloud dataplex environments add-iam-policy-binding` command."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.dataplex import environment
from googlecloudsdk.api_lib.util import exceptions as gcloud_exception
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.dataplex import resource_args
from googlecloudsdk.command_lib.iam import iam_util
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class AddIamPolicyBinding(base.Command):
"""Adds IAM policy binding to a Dataplex Environment."""
detailed_help = {
'EXAMPLES':
"""
To add an IAM policy binding for the role of `roles/dataplex.viewer`
for the user 'testuser@gmail.com' to environment `test-environment` within lake
`test-lake` in location `us-central`, run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake --role=roles/dataplex.viewer --member=user:testuser@gmail.com
See https://cloud.google.com/dataplex/docs/iam-roles for details of
policy role and member types.
""",
}
@staticmethod
def Args(parser):
resource_args.AddEnvironmentResourceArg(parser,
'to add IAM policy binding to.')
iam_util.AddArgsForAddIamPolicyBinding(parser)
@gcloud_exception.CatchHTTPErrorRaiseHTTPException(
'Status code: {status_code}. {status_message}.')
def Run(self, args):
environment_ref = args.CONCEPTS.environment.Parse()
result = environment.AddIamPolicyBinding(environment_ref, args.member,
args.role)
return result

View File

@@ -0,0 +1,172 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""`gcloud dataplex environments create` command."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.dataplex import environment
from googlecloudsdk.api_lib.dataplex import util as dataplex_util
from googlecloudsdk.api_lib.util import exceptions as gcloud_exception
from googlecloudsdk.calliope import arg_parsers
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.dataplex import resource_args
from googlecloudsdk.command_lib.util.args import labels_util
from googlecloudsdk.core import log
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Create(base.Command):
"""Create a Dataplex Environment."""
detailed_help = {
'EXAMPLES':
"""\
To create a Dataplex Environment `test-environment` within lake `test-lake` in
location `us-central1` inside project `test-project` , run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake --os-image-version=1.0
To know about the other required arguments to create an environment run:
$ gcloud dataplex environment create --help
""",
}
@staticmethod
def Args(parser):
resource_args.AddEnvironmentResourceArg(parser,
'to create a Environment to.')
parser.add_argument(
'--description', required=False, help='Description of the Environment')
parser.add_argument(
'--display-name',
required=False,
help='Display Name of the Environment')
infrastructure_spec = parser.add_group(
required=True,
help='Configuration for the underlying infrastructure used to run workloads.'
)
compute_resources = infrastructure_spec.add_group(
help='Compute resources associated with the analyze interactive workloads.'
)
compute_resources.add_argument(
'--compute-disk-size-gb',
type=int,
default=100,
required=False,
help='Size in GB of the disk. Default is 100 GB.')
compute_resources.add_argument(
'--compute-node-count',
type=int,
default=0,
required=False,
help='Total number of worker nodes in the cluster.')
compute_resources.add_argument(
'--compute-max-node-count',
type=int,
default=0,
required=False,
help='Maximum number of configurable nodes.')
os_image_runtime = infrastructure_spec.add_group(
required=True, help='Software Runtime Configuration to run Analyze.')
os_image_runtime.add_argument(
'--os-image-version', required=True, help='Dataplex Image version.')
os_image_runtime.add_argument(
'--os-image-java-libraries',
default=[],
metavar='OS_IMAGE_JAVA_LIBRARIES',
type=arg_parsers.ArgList(),
required=False,
help='List of Java jars to be included in the runtime environment. Valid input includes Cloud Storage URIs to Jar binaries. For example, gs://bucket-name/my/path/to/file.jar'
)
os_image_runtime.add_argument(
'--os-image-python-packages',
default=[],
metavar='OS_IMAGE_PYTHON_PACKAGES',
type=arg_parsers.ArgList(),
required=False,
help='A list of python packages to be installed. Valid formats include Cloud Storage URI to a PIP installable library. For example, gs://bucket-name/my/path/to/lib.tar.gz'
)
os_image_runtime.add_argument(
'--os-image-properties',
metavar='OS_IMAGE_PROPERTIES',
type=arg_parsers.ArgDict(),
required=False,
help='Override to common configuration of open source components installed on the Dataproc cluster. The properties to set on daemon config files. Property keys are specified in `prefix:property` format.'
)
session_spec = parser.add_group(
help='Configuration for sessions created for the environment to be created.'
)
session_spec.add_argument(
'--session-max-idle-duration',
required=False,
help='The idle time configuration of the session. The session will be auto-terminated at the end of this period.'
)
session_spec.add_argument(
'--session-enable-fast-startup',
action='store_true',
required=False,
default=False,
help='Enables fast startup. This causes sessions to be pre-created and available for faster startup to enable interactive exploration use-cases.'
)
async_group = parser.add_group(
mutex=True,
required=False,
help='At most one of --async | --validate-only can be specified.')
async_group.add_argument(
'--validate-only',
action='store_true',
default=False,
help='Validate the create action, but don\'t actually perform it.')
base.ASYNC_FLAG.AddToParser(async_group)
labels_util.AddCreateLabelsFlags(parser)
@gcloud_exception.CatchHTTPErrorRaiseHTTPException(
'Status code: {status_code}. {status_message}.')
def Run(self, args):
environment_ref = args.CONCEPTS.environment.Parse()
dataplex_client = dataplex_util.GetClientInstance()
create_req_op = dataplex_client.projects_locations_lakes_environments.Create(
dataplex_util.GetMessageModule(
).DataplexProjectsLocationsLakesEnvironmentsCreateRequest(
environmentId=environment_ref.Name(),
parent=environment_ref.Parent().RelativeName(),
validateOnly=args.validate_only,
googleCloudDataplexV1Environment=environment
.GenerateEnvironmentForCreateRequest(args)))
validate_only = getattr(args, 'validate_only', False)
if validate_only:
log.status.Print('Validation complete.')
return
async_ = getattr(args, 'async_', False)
if not async_:
response = environment.WaitForOperation(create_req_op)
log.CreatedResource(
response.name,
details='Environment created in lake [{0}] in project [{1}] with location [{2}]'
.format(environment_ref.lakesId, environment_ref.projectsId,
environment_ref.locationsId))
return response
log.status.Print(
'Creating environment with path [{0}] and operation [{1}].'.format(
environment_ref, create_req_op.name))
return create_req_op

View File

@@ -0,0 +1,22 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: |
Delete a Dataplex Environment.
description: |
Delete a Dataplex Environment based on project, location, lake, environment.
examples: |
To delete a Dataplex Environment `test-environment` in project `test-project` under location `us-central1` within lake `test-lake`, run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake
request:
ALPHA:
api_version: v1
collection: dataplex.projects.locations.lakes.environments
arguments:
resource:
help_text: |
Arguments and flags that define the Dataplex Environment you want to delete.
spec: !REF googlecloudsdk.command_lib.dataplex.resources:environment
async:
collection: dataplex.projects.locations.operations

View File

@@ -0,0 +1,22 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: |
Retrieve a Dataplex Environment.
description: |
Get a Dataplex Environment resource based on project, location, lake, and environment.
examples: |
To describe a Dataplex Environment `test-environment` in project `test-project` under location `us-central1` within lake `test-lake`, run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake
request:
ALPHA:
api_version: v1
collection: dataplex.projects.locations.lakes.environments
method: get
arguments:
resource:
help_text: |
Arguments and flags that define the Dataplex Environment you want to retrieve.
spec: !REF googlecloudsdk.command_lib.dataplex.resources:environment

View File

@@ -0,0 +1,18 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: |
Retrieve a Dataplex Environment IAM policy.
description: |
Get a Dataplex Environment Iam Policy based on project_id, location, lake_id, and environment_id.
examples: |
To get the IAM policy of a Dataplex Environment `test-environment` in project `test-project` under location `us-central1` within lake `test-lake`, run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake
request:
collection: dataplex.projects.locations.lakes.environments
arguments:
resource:
help_text: |
Arguments and flags that define the Dataplex Environment IAM policy you want to retrieve.
spec: !REF googlecloudsdk.command_lib.dataplex.resources:environment

View File

@@ -0,0 +1,36 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: |
List Dataplex Environments.
description: |
List Dataplex Environments based on project, location and lake.
examples: |
To list all Dataplex Environments in lake `test-lake` under location `us-central1`, run :-
$ {command} --project=test-project --location=us-central1 --lake=test-lake
request:
ALPHA:
api_version: v1
collection: dataplex.projects.locations.lakes.environments
arguments:
resource:
help_text: |
Arguments and flags that define the Dataplex Environments you want to list.
spec: !REF googlecloudsdk.command_lib.dataplex.resources:lake
response:
id_field: name
output:
format: |
table(
name.basename():label=NAME,
displayName:label=DISPLAY_NAME,
state:label=ENVIRONMENT_STATUS,
infrastructureSpec.compute.diskSizeGb:label=COMPUTE_DISK_SIZE_GB,
infrastructureSpec.compute.nodeCount:label=COMPUTE_NODE_COUNT,
infrastructureSpec.compute.maxNodeCount:label=COMPUTE_MAX_NODE_COUNT,
infrastructureSpec.osImage.imageVersion:label=OS_IMAGE_VERSION,
sessionSpec.maxIdleDuration:label=SESSION_MAX_IDLE_DURATION
)

View File

@@ -0,0 +1,62 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""`gcloud dataplex environment remove-iam-policy-binding` command."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.dataplex import environment
from googlecloudsdk.api_lib.util import exceptions as gcloud_exception
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.dataplex import resource_args
from googlecloudsdk.command_lib.iam import iam_util
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class RemoveIamPolicyBinding(base.Command):
"""Removes IAM policy binding from a Dataplex Environment."""
detailed_help = {
'EXAMPLES':
"""\
To remove an IAM policy binding for the role `roles/dataplex.viewer`
for the user `testuser@gmail.com` from an environment `test-environment` within lake
`test-lake` in location `us-central1`, run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake --role=roles/dataplex.viewer --member=user:testuser@gmail.com
See https://cloud.google.com/dataplex/docs/iam-roles for details of
policy role and member types.
""",
}
@staticmethod
def Args(parser):
resource_args.AddEnvironmentResourceArg(
parser, 'to remove IAM policy binding from ')
iam_util.AddArgsForRemoveIamPolicyBinding(parser)
@gcloud_exception.CatchHTTPErrorRaiseHTTPException(
'Status code: {status_code}. {status_message}.')
def Run(self, args):
environment_ref = args.CONCEPTS.environment.Parse()
result = environment.RemoveIamPolicyBinding(environment_ref, args.member,
args.role)
return result

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Command group for Dataplex Session services."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Sessions(base.Group):
"""Manage Dataplex Sessions services."""

View File

@@ -0,0 +1,28 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: |
List Sessions associated with a Environment.
description: |
List Sessions associated with a Environment based on project, location, lake and environment.
examples: |
To list sessions associated with a Dataplex Environment `test-environment` in project `test-project` and lake `test-lake` under location `us-central1`, run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake
request:
ALPHA:
api_version: v1
collection: dataplex.projects.locations.lakes.environments.sessions
arguments:
resource:
help_text: |
Arguments and flags that define the Dataplex Environment to list the Sessions associated with the Environment.
spec: !REF googlecloudsdk.command_lib.dataplex.resources:environment
output:
format: |
table(
name.basename():label=SESSION_ID,
state:label=SESSION_STATUS,
userId:label=USER_ID,
createTime:label=CREATE_TIME
)

View File

@@ -0,0 +1,60 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""`gcloud dataplex environment set-iam-policy-binding` command."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.dataplex import environment
from googlecloudsdk.api_lib.util import exceptions as gcloud_exception
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.dataplex import resource_args
from googlecloudsdk.command_lib.iam import iam_util
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class SetIamPolicy(base.Command):
"""Set an IAM policy binding for a Dataplex Environment as defined in a JSON or YAML file.
See https://cloud.google.com/iam/docs/managing-policies for details of
the policy file format and contents.
"""
detailed_help = {
'EXAMPLES':
"""\
The following command will read an IAM policy defined in a JSON file
`policy.json` and set it for the Dataplex environment `test-environment` within
lake `test-lake` in location `us-central1`:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake policy.json
where policy.json is the relative path to the json file.
""",
}
@staticmethod
def Args(parser):
resource_args.AddEnvironmentResourceArg(parser, 'to set IAM policy to.')
iam_util.AddArgForPolicyFile(parser)
@gcloud_exception.CatchHTTPErrorRaiseHTTPException(
'Status code: {status_code}. {status_message}.')
def Run(self, args):
environment_ref = args.CONCEPTS.environment.Parse()
result = environment.SetIamPolicyFromFile(environment_ref, args.policy_file)
return result

View File

@@ -0,0 +1,157 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""`gcloud dataplex environments update` command."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.dataplex import environment
from googlecloudsdk.api_lib.dataplex import util as dataplex_util
from googlecloudsdk.api_lib.util import exceptions as gcloud_exception
from googlecloudsdk.calliope import arg_parsers
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.command_lib.dataplex import resource_args
from googlecloudsdk.command_lib.util.args import labels_util
from googlecloudsdk.core import log
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Update(base.Command):
"""Update a Dataplex Environment with the given configurations.
"""
detailed_help = {
'EXAMPLES':
"""\
To update a Dataplex environment `test-environment` within lake `test-lake` in location `us-central1` and
change the description to `Updated Description`, run:
$ {command} test-environment --project=test-project --location=us-central1 --lake=test-lake --description='Updated Description'
""",
}
@staticmethod
def Args(parser):
resource_args.AddEnvironmentResourceArg(parser,
'to update a Environment to.')
parser.add_argument('--description', help='Description of the Environment')
parser.add_argument(
'--display-name', help='Display Name of the Environment')
infrastructure_spec = parser.add_group(
help='Configuration for the underlying infrastructure used to run workloads.'
)
compute_resources = infrastructure_spec.add_group(
help='Compute resources associated with the analyze interactive workloads.'
)
compute_resources.add_argument(
'--compute-disk-size-gb',
type=int,
help='Size in GB of the disk. Default is 100 GB.')
compute_resources.add_argument(
'--compute-node-count',
type=int,
help='Total number of worker nodes in the cluster.')
compute_resources.add_argument(
'--compute-max-node-count',
type=int,
help='Maximum number of configurable nodes.')
os_image_runtime = infrastructure_spec.add_group(
help='Software Runtime Configuration to run Analyze.')
os_image_runtime.add_argument(
'--os-image-version', help='Dataplex Image version.')
os_image_runtime.add_argument(
'--os-image-java-libraries',
metavar='OS_IMAGE_JAVA_LIBRARIES',
type=arg_parsers.ArgList(),
default=[],
help='List of Java jars to be included in the runtime environment. Valid input includes Cloud Storage URIs to Jar binaries. For example, gs://bucket-name/my/path/to/file.jar'
)
os_image_runtime.add_argument(
'--os-image-python-packages',
metavar='OS_IMAGE_PYTHON_PACKAGES',
type=arg_parsers.ArgList(),
default=[],
help='A list of python packages to be installed. Valid formats include Cloud Storage URI to a PIP installable library. For example, gs://bucket-name/my/path/to/lib.tar.gz'
)
os_image_runtime.add_argument(
'--os-image-properties',
metavar='OS_IMAGE_PROPERTIES',
type=arg_parsers.ArgDict(),
help='Override to common configuration of open source components installed on the Dataproc cluster. The properties to set on daemon config files. Property keys are specified in `prefix:property` format.'
)
session_spec = parser.add_group(
help='Configuration for sessions created for the environment to be updated.'
)
session_spec.add_argument(
'--session-max-idle-duration',
help='The idle time configuration of the session. The session will be auto-terminated at the end of this period.'
)
session_spec.add_argument(
'--session-enable-fast-startup',
action='store_true',
default=False,
required=False,
help='Enables fast startup. This causes sessions to be pre-created and available for faster startup to enable interactive exploration use-cases.'
)
async_group = parser.add_group(
mutex=True,
required=False,
help='At most one of --async | --validate-only can be specified.')
async_group.add_argument(
'--validate-only',
action='store_true',
default=False,
help='Validate the create action, but don\'t actually perform it.')
base.ASYNC_FLAG.AddToParser(async_group)
labels_util.AddCreateLabelsFlags(parser)
@gcloud_exception.CatchHTTPErrorRaiseHTTPException(
'Status code: {status_code}. {status_message}.')
def Run(self, args):
update_mask = environment.GenerateUpdateMask(args)
if len(update_mask) < 1:
raise exceptions.HttpException(
'Update commands must specify at least one additional parameter to change.'
)
environment_ref = args.CONCEPTS.environment.Parse()
dataplex_client = dataplex_util.GetClientInstance()
message = dataplex_util.GetMessageModule()
update_req_op = dataplex_client.projects_locations_lakes_environments.Patch(
message.DataplexProjectsLocationsLakesEnvironmentsPatchRequest(
name=environment_ref.RelativeName(),
validateOnly=args.validate_only,
updateMask=u','.join(update_mask),
googleCloudDataplexV1Environment=environment
.GenerateEnvironmentForUpdateRequest(args)))
validate_only = getattr(args, 'validate_only', False)
if validate_only:
log.status.Print('Validation complete.')
return
async_ = getattr(args, 'async_', False)
if not async_:
response = environment.WaitForOperation(update_req_op)
log.UpdatedResource(environment_ref, details='Operation was successful.')
return response
log.status.Print('Updating [{0}] with operation [{1}].'.format(
environment_ref, update_req_op.name))
return update_req_op