Skip to content

feat: [google-cloud-network-management] add round-trip mode #13280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 14, 2024
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__ = "1.21.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__ = "1.21.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 @@ -132,6 +132,15 @@ class ConnectivityTest(proto.Message):
creating a new test, updating an existing test,
or triggering a one-time rerun of an existing
test.
round_trip (bool):
Whether run analysis for the return path from
destination to source. Default value is false.
return_reachability_details (google.cloud.network_management_v1.types.ReachabilityDetails):
Output only. The reachability details of this
test from the latest run for the return path.
The details are updated when creating a new
test, updating an existing test, or triggering a
one-time rerun of an existing test.
bypass_firewall_checks (bool):
Whether the test should skip firewall
checking. If not provided, we assume false.
Expand Down Expand Up @@ -192,6 +201,15 @@ class ConnectivityTest(proto.Message):
number=14,
message="ProbingDetails",
)
round_trip: bool = proto.Field(
proto.BOOL,
number=15,
)
return_reachability_details: "ReachabilityDetails" = proto.Field(
proto.MESSAGE,
number=16,
message="ReachabilityDetails",
)
bypass_firewall_checks: bool = proto.Field(
proto.BOOL,
number=17,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-network-management",
"version": "1.21.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,7 @@ def test_get_connectivity_test(request_type, transport: str = "grpc"):
protocol="protocol_value",
related_projects=["related_projects_value"],
display_name="display_name_value",
round_trip=True,
bypass_firewall_checks=True,
)
response = client.get_connectivity_test(request)
Expand All @@ -1743,6 +1744,7 @@ def test_get_connectivity_test(request_type, transport: str = "grpc"):
assert response.protocol == "protocol_value"
assert response.related_projects == ["related_projects_value"]
assert response.display_name == "display_name_value"
assert response.round_trip is True
assert response.bypass_firewall_checks is True


Expand Down Expand Up @@ -1884,6 +1886,7 @@ async def test_get_connectivity_test_async(
protocol="protocol_value",
related_projects=["related_projects_value"],
display_name="display_name_value",
round_trip=True,
bypass_firewall_checks=True,
)
)
Expand All @@ -1902,6 +1905,7 @@ async def test_get_connectivity_test_async(
assert response.protocol == "protocol_value"
assert response.related_projects == ["related_projects_value"]
assert response.display_name == "display_name_value"
assert response.round_trip is True
assert response.bypass_firewall_checks is True


Expand Down Expand Up @@ -4855,6 +4859,7 @@ async def test_get_connectivity_test_empty_call_grpc_asyncio():
protocol="protocol_value",
related_projects=["related_projects_value"],
display_name="display_name_value",
round_trip=True,
bypass_firewall_checks=True,
)
)
Expand Down Expand Up @@ -5159,6 +5164,7 @@ def test_get_connectivity_test_rest_call_success(request_type):
protocol="protocol_value",
related_projects=["related_projects_value"],
display_name="display_name_value",
round_trip=True,
bypass_firewall_checks=True,
)

Expand All @@ -5180,6 +5186,7 @@ def test_get_connectivity_test_rest_call_success(request_type):
assert response.protocol == "protocol_value"
assert response.related_projects == ["related_projects_value"]
assert response.display_name == "display_name_value"
assert response.round_trip is True
assert response.bypass_firewall_checks is True


Expand Down Expand Up @@ -5613,6 +5620,8 @@ def test_create_connectivity_test_rest_call_success(request_type):
"metropolitan_area": "metropolitan_area_value"
},
},
"round_trip": True,
"return_reachability_details": {},
"bypass_firewall_checks": True,
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
Expand Down Expand Up @@ -6139,6 +6148,8 @@ def test_update_connectivity_test_rest_call_success(request_type):
"metropolitan_area": "metropolitan_area_value"
},
},
"round_trip": True,
"return_reachability_details": {},
"bypass_firewall_checks": True,
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
Expand Down
Loading