Skip to content

Commit d73c3fd

Browse files
chore: upgrade gapic-generator-python to 0.46.3 (#73)
feat: support self-signed JWT flow for service accounts fix: add async client to %name_%version/init.py chore: add autogenerated snippets chore: remove auth, policy, and options from the reserved names list chore: enable GAPIC metadata generation chore: sort subpackages in %namespace/%name/init.py
1 parent ed2850c commit d73c3fd

23 files changed

Lines changed: 723 additions & 465 deletions

File tree

packages/google-cloud-os-login/google/cloud/oslogin/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,12 +14,13 @@
1514
# limitations under the License.
1615
#
1716

18-
from google.cloud.oslogin_v1.services.os_login_service.async_client import (
19-
OsLoginServiceAsyncClient,
20-
)
2117
from google.cloud.oslogin_v1.services.os_login_service.client import (
2218
OsLoginServiceClient,
2319
)
20+
from google.cloud.oslogin_v1.services.os_login_service.async_client import (
21+
OsLoginServiceAsyncClient,
22+
)
23+
2424
from google.cloud.oslogin_v1.types.oslogin import DeletePosixAccountRequest
2525
from google.cloud.oslogin_v1.types.oslogin import DeleteSshPublicKeyRequest
2626
from google.cloud.oslogin_v1.types.oslogin import GetLoginProfileRequest
@@ -31,14 +31,14 @@
3131
from google.cloud.oslogin_v1.types.oslogin import UpdateSshPublicKeyRequest
3232

3333
__all__ = (
34+
"OsLoginServiceClient",
35+
"OsLoginServiceAsyncClient",
3436
"DeletePosixAccountRequest",
3537
"DeleteSshPublicKeyRequest",
3638
"GetLoginProfileRequest",
3739
"GetSshPublicKeyRequest",
3840
"ImportSshPublicKeyRequest",
3941
"ImportSshPublicKeyResponse",
4042
"LoginProfile",
41-
"OsLoginServiceAsyncClient",
42-
"OsLoginServiceClient",
4343
"UpdateSshPublicKeyRequest",
4444
)

packages/google-cloud-os-login/google/cloud/oslogin_v1/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,6 +15,8 @@
1615
#
1716

1817
from .services.os_login_service import OsLoginServiceClient
18+
from .services.os_login_service import OsLoginServiceAsyncClient
19+
1920
from .types.oslogin import DeletePosixAccountRequest
2021
from .types.oslogin import DeleteSshPublicKeyRequest
2122
from .types.oslogin import GetLoginProfileRequest
@@ -25,15 +26,15 @@
2526
from .types.oslogin import LoginProfile
2627
from .types.oslogin import UpdateSshPublicKeyRequest
2728

28-
2929
__all__ = (
30+
"OsLoginServiceAsyncClient",
3031
"DeletePosixAccountRequest",
3132
"DeleteSshPublicKeyRequest",
3233
"GetLoginProfileRequest",
3334
"GetSshPublicKeyRequest",
3435
"ImportSshPublicKeyRequest",
3536
"ImportSshPublicKeyResponse",
3637
"LoginProfile",
37-
"UpdateSshPublicKeyRequest",
3838
"OsLoginServiceClient",
39+
"UpdateSshPublicKeyRequest",
3940
)

packages/google-cloud-os-login/google/cloud/oslogin_v1/common/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,13 +14,13 @@
1514
# limitations under the License.
1615
#
1716

18-
from .types.common import OperatingSystemType
17+
1918
from .types.common import PosixAccount
2019
from .types.common import SshPublicKey
21-
20+
from .types.common import OperatingSystemType
2221

2322
__all__ = (
2423
"OperatingSystemType",
25-
"SshPublicKey",
2624
"PosixAccount",
25+
"SshPublicKey",
2726
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3+
"language": "python",
4+
"libraryPackage": "google.cloud.oslogin.common",
5+
"protoPackage": "google.cloud.oslogin.common",
6+
"schema": "1.0"
7+
}

packages/google-cloud-os-login/google/cloud/oslogin_v1/common/types/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +13,6 @@
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
1615
#
17-
1816
from .common import (
1917
PosixAccount,
2018
SshPublicKey,

packages/google-cloud-os-login/google/cloud/oslogin_v1/common/types/common.py

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +13,6 @@
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
1615
#
17-
1816
import proto # type: ignore
1917

2018

@@ -66,29 +64,19 @@ class PosixAccount(proto.Message):
6664
Output only. The canonical resource name.
6765
"""
6866

69-
primary = proto.Field(proto.BOOL, number=1)
70-
71-
username = proto.Field(proto.STRING, number=2)
72-
73-
uid = proto.Field(proto.INT64, number=3)
74-
75-
gid = proto.Field(proto.INT64, number=4)
76-
77-
home_directory = proto.Field(proto.STRING, number=5)
78-
79-
shell = proto.Field(proto.STRING, number=6)
80-
81-
gecos = proto.Field(proto.STRING, number=7)
82-
83-
system_id = proto.Field(proto.STRING, number=8)
84-
85-
account_id = proto.Field(proto.STRING, number=9)
86-
67+
primary = proto.Field(proto.BOOL, number=1,)
68+
username = proto.Field(proto.STRING, number=2,)
69+
uid = proto.Field(proto.INT64, number=3,)
70+
gid = proto.Field(proto.INT64, number=4,)
71+
home_directory = proto.Field(proto.STRING, number=5,)
72+
shell = proto.Field(proto.STRING, number=6,)
73+
gecos = proto.Field(proto.STRING, number=7,)
74+
system_id = proto.Field(proto.STRING, number=8,)
75+
account_id = proto.Field(proto.STRING, number=9,)
8776
operating_system_type = proto.Field(
8877
proto.ENUM, number=10, enum="OperatingSystemType",
8978
)
90-
91-
name = proto.Field(proto.STRING, number=11)
79+
name = proto.Field(proto.STRING, number=11,)
9280

9381

9482
class SshPublicKey(proto.Message):
@@ -109,13 +97,10 @@ class SshPublicKey(proto.Message):
10997
Output only. The canonical resource name.
11098
"""
11199

112-
key = proto.Field(proto.STRING, number=1)
113-
114-
expiration_time_usec = proto.Field(proto.INT64, number=2)
115-
116-
fingerprint = proto.Field(proto.STRING, number=3)
117-
118-
name = proto.Field(proto.STRING, number=4)
100+
key = proto.Field(proto.STRING, number=1,)
101+
expiration_time_usec = proto.Field(proto.INT64, number=2,)
102+
fingerprint = proto.Field(proto.STRING, number=3,)
103+
name = proto.Field(proto.STRING, number=4,)
119104

120105

121106
__all__ = tuple(sorted(__protobuf__.manifest))
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3+
"language": "python",
4+
"libraryPackage": "google.cloud.oslogin_v1",
5+
"protoPackage": "google.cloud.oslogin.v1",
6+
"schema": "1.0",
7+
"services": {
8+
"OsLoginService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "OsLoginServiceClient",
12+
"rpcs": {
13+
"DeletePosixAccount": {
14+
"methods": [
15+
"delete_posix_account"
16+
]
17+
},
18+
"DeleteSshPublicKey": {
19+
"methods": [
20+
"delete_ssh_public_key"
21+
]
22+
},
23+
"GetLoginProfile": {
24+
"methods": [
25+
"get_login_profile"
26+
]
27+
},
28+
"GetSshPublicKey": {
29+
"methods": [
30+
"get_ssh_public_key"
31+
]
32+
},
33+
"ImportSshPublicKey": {
34+
"methods": [
35+
"import_ssh_public_key"
36+
]
37+
},
38+
"UpdateSshPublicKey": {
39+
"methods": [
40+
"update_ssh_public_key"
41+
]
42+
}
43+
}
44+
},
45+
"grpc-async": {
46+
"libraryClient": "OsLoginServiceAsyncClient",
47+
"rpcs": {
48+
"DeletePosixAccount": {
49+
"methods": [
50+
"delete_posix_account"
51+
]
52+
},
53+
"DeleteSshPublicKey": {
54+
"methods": [
55+
"delete_ssh_public_key"
56+
]
57+
},
58+
"GetLoginProfile": {
59+
"methods": [
60+
"get_login_profile"
61+
]
62+
},
63+
"GetSshPublicKey": {
64+
"methods": [
65+
"get_ssh_public_key"
66+
]
67+
},
68+
"ImportSshPublicKey": {
69+
"methods": [
70+
"import_ssh_public_key"
71+
]
72+
},
73+
"UpdateSshPublicKey": {
74+
"methods": [
75+
"update_ssh_public_key"
76+
]
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}
83+
}

packages/google-cloud-os-login/google/cloud/oslogin_v1/services/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");

packages/google-cloud-os-login/google/cloud/oslogin_v1/services/os_login_service/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
32
# Copyright 2020 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +13,6 @@
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
1615
#
17-
1816
from .client import OsLoginServiceClient
1917
from .async_client import OsLoginServiceAsyncClient
2018

0 commit comments

Comments
 (0)