Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.12.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "2.12.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ class ImportSshPublicKeyRequest(proto.Message):
project_id (str):
The project ID of the Google Cloud Platform
project.
regions (MutableSequence[str]):
Optional. The regions to which to assert that
the key was written. If unspecified, defaults to
all regions. Regions are listed at
https://cloud.google.com/about/locations#region.
"""

parent: str = proto.Field(
Expand All @@ -202,6 +207,10 @@ class ImportSshPublicKeyRequest(proto.Message):
proto.STRING,
number=3,
)
regions: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=5,
)


class ImportSshPublicKeyResponse(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-os-login",
"version": "2.12.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class osloginCallTransformer(cst.CSTTransformer):
'delete_ssh_public_key': ('name', ),
'get_login_profile': ('name', 'project_id', 'system_id', ),
'get_ssh_public_key': ('name', ),
'import_ssh_public_key': ('parent', 'ssh_public_key', 'project_id', ),
'import_ssh_public_key': ('parent', 'ssh_public_key', 'project_id', 'regions', ),
'update_ssh_public_key': ('name', 'ssh_public_key', 'update_mask', ),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4039,7 +4039,12 @@ def test_import_ssh_public_key_rest_required_fields(
credentials=ga_credentials.AnonymousCredentials()
).import_ssh_public_key._get_unset_required_fields(jsonified_request)
# Check that path parameters and body parameters are not mixing in.
assert not set(unset_fields) - set(("project_id",))
assert not set(unset_fields) - set(
(
"project_id",
"regions",
)
)
jsonified_request.update(unset_fields)

# verify required fields with non-default values are left alone
Expand Down Expand Up @@ -4094,7 +4099,15 @@ def test_import_ssh_public_key_rest_unset_required_fields():
)

unset_fields = transport.import_ssh_public_key._get_unset_required_fields({})
assert set(unset_fields) == (set(("projectId",)) & set(("parent",)))
assert set(unset_fields) == (
set(
(
"projectId",
"regions",
)
)
& set(("parent",))
)


@pytest.mark.parametrize("null_interceptor", [True, False])
Expand Down