Skip to content

Commit

Permalink
feat: added EndpointLocation (v1, v1beta, v1alpha) (#11763)
Browse files Browse the repository at this point in the history
BEGIN_COMMIT_OVERRIDE
feat: added EndpointLocation (v1, v1beta, v1alpha)
END_COMMIT_OVERRIDE
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 568664317

Source-Link:
googleapis/googleapis@9b6656e

Source-Link:
googleapis/googleapis-gen@1cdc6ea
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFwcm9jLW1ldGFzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiMWNkYzZlYTRiMDY4ZWU5NzlmMjIxNDNlMWFmMzk5MTlkYzRiMTlkOSJ9

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: ohmayr <omairnaveed@ymail.com>
  • Loading branch information
3 people authored Sep 29, 2023
1 parent bfc25b7 commit b254665
Show file tree
Hide file tree
Showing 15 changed files with 106 additions and 43 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-dataproc-metastore/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system- -- -k <name of test>
$ nox -s system-3.11 -- -k <name of test>


.. note::

System tests are only configured to run under Python.
System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
Expand Down
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__ = "1.12.1" # {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__ = "1.12.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ class AuxiliaryVersionConfig(proto.Message):
class NetworkConfig(proto.Message):
r"""Network configuration for the Dataproc Metastore service.
Next available ID: 4
Attributes:
consumers (MutableSequence[google.cloud.metastore_v1.types.NetworkConfig.Consumer]):
Immutable. The consumer-side network
Expand All @@ -589,6 +591,7 @@ class NetworkConfig(proto.Message):
class Consumer(proto.Message):
r"""Contains information of the customer's network
configurations.
Next available ID: 5
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Expand All @@ -609,6 +612,9 @@ class Consumer(proto.Message):
endpoint_uri (str):
Output only. The URI of the endpoint used to
access the metastore service.
endpoint_location (str):
Output only. The location of the endpoint URI. Format:
``projects/{project}/locations/{location}``.
"""

subnetwork: str = proto.Field(
Expand All @@ -620,6 +626,10 @@ class Consumer(proto.Message):
proto.STRING,
number=3,
)
endpoint_location: str = proto.Field(
proto.STRING,
number=4,
)

consumers: MutableSequence[Consumer] = proto.RepeatedField(
proto.MESSAGE,
Expand Down
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__ = "1.12.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ class AuxiliaryVersionConfig(proto.Message):
class NetworkConfig(proto.Message):
r"""Network configuration for the Dataproc Metastore service.
Next available ID: 4
Attributes:
consumers (MutableSequence[google.cloud.metastore_v1alpha.types.NetworkConfig.Consumer]):
Immutable. The consumer-side network
Expand All @@ -686,6 +688,7 @@ class NetworkConfig(proto.Message):
class Consumer(proto.Message):
r"""Contains information of the customer's network
configurations.
Next available ID: 5
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Expand All @@ -706,6 +709,9 @@ class Consumer(proto.Message):
endpoint_uri (str):
Output only. The URI of the endpoint used to
access the metastore service.
endpoint_location (str):
Output only. The location of the endpoint URI. Format:
``projects/{project}/locations/{location}``.
"""

subnetwork: str = proto.Field(
Expand All @@ -717,6 +723,10 @@ class Consumer(proto.Message):
proto.STRING,
number=3,
)
endpoint_location: str = proto.Field(
proto.STRING,
number=4,
)

consumers: MutableSequence[Consumer] = proto.RepeatedField(
proto.MESSAGE,
Expand Down
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__ = "1.12.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ class AuxiliaryVersionConfig(proto.Message):
class NetworkConfig(proto.Message):
r"""Network configuration for the Dataproc Metastore service.
Next available ID: 4
Attributes:
consumers (MutableSequence[google.cloud.metastore_v1beta.types.NetworkConfig.Consumer]):
Immutable. The consumer-side network
Expand All @@ -686,6 +688,7 @@ class NetworkConfig(proto.Message):
class Consumer(proto.Message):
r"""Contains information of the customer's network
configurations.
Next available ID: 5
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Expand All @@ -706,6 +709,9 @@ class Consumer(proto.Message):
endpoint_uri (str):
Output only. The URI of the endpoint used to
access the metastore service.
endpoint_location (str):
Output only. The location of the endpoint URI. Format:
``projects/{project}/locations/{location}``.
"""

subnetwork: str = proto.Field(
Expand All @@ -717,6 +723,10 @@ class Consumer(proto.Message):
proto.STRING,
number=3,
)
endpoint_location: str = proto.Field(
proto.STRING,
number=4,
)

consumers: MutableSequence[Consumer] = proto.RepeatedField(
proto.MESSAGE,
Expand Down
23 changes: 1 addition & 22 deletions packages/google-cloud-dataproc-metastore/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
UNIT_TEST_EXTRAS = []
UNIT_TEST_EXTRAS_BY_PYTHON = {}

SYSTEM_TEST_PYTHON_VERSIONS = []
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
"mock",
"pytest",
Expand Down Expand Up @@ -405,24 +405,3 @@ def prerelease_deps(session):
session.run("python", "-c", "import google.auth; print(google.auth.__version__)")

session.run("py.test", "tests/unit")

system_test_path = os.path.join("tests", "system.py")
system_test_folder_path = os.path.join("tests", "system")

# Only run system tests if found.
if os.path.exists(system_test_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_path,
*session.posargs,
)
if os.path.exists(system_test_folder_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_folder_path,
*session.posargs,
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-dataproc-metastore",
"version": "1.12.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-dataproc-metastore",
"version": "1.12.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-dataproc-metastore",
"version": "1.12.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6109,7 +6109,11 @@ def test_create_service_rest(request_type):
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
]
},
"database_type": 1,
Expand Down Expand Up @@ -6372,7 +6376,11 @@ def test_create_service_rest_bad_request(
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
]
},
"database_type": 1,
Expand Down Expand Up @@ -6532,7 +6540,11 @@ def test_update_service_rest(request_type):
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
]
},
"database_type": 1,
Expand Down Expand Up @@ -6778,7 +6790,11 @@ def test_update_service_rest_bad_request(
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
]
},
"database_type": 1,
Expand Down Expand Up @@ -9611,6 +9627,7 @@ def test_create_backup_rest(request_type):
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
]
},
Expand Down Expand Up @@ -9886,6 +9903,7 @@ def test_create_backup_rest_bad_request(
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6275,7 +6275,11 @@ def test_create_service_rest(request_type):
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
],
"custom_routes_enabled": True,
},
Expand Down Expand Up @@ -6543,7 +6547,11 @@ def test_create_service_rest_bad_request(
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
],
"custom_routes_enabled": True,
},
Expand Down Expand Up @@ -6709,7 +6717,11 @@ def test_update_service_rest(request_type):
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
],
"custom_routes_enabled": True,
},
Expand Down Expand Up @@ -6960,7 +6972,11 @@ def test_update_service_rest_bad_request(
"encryption_config": {"kms_key": "kms_key_value"},
"network_config": {
"consumers": [
{"subnetwork": "subnetwork_value", "endpoint_uri": "endpoint_uri_value"}
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
],
"custom_routes_enabled": True,
},
Expand Down Expand Up @@ -9799,6 +9815,7 @@ def test_create_backup_rest(request_type):
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
],
"custom_routes_enabled": True,
Expand Down Expand Up @@ -10079,6 +10096,7 @@ def test_create_backup_rest_bad_request(
{
"subnetwork": "subnetwork_value",
"endpoint_uri": "endpoint_uri_value",
"endpoint_location": "endpoint_location_value",
}
],
"custom_routes_enabled": True,
Expand Down
Loading

0 comments on commit b254665

Please sign in to comment.