googleapis / python-compute

This library has moved to https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-compute
Apache License 2.0
39 stars 26 forks source link

md5_authentication_key in compute_v1.RoutersClient() RouterBgpPeer Claas #354

Closed rjouhann closed 1 year ago

rjouhann commented 2 years ago

Environment details

Steps to reproduce

It is not possible to setup MD5 authentication using the Python SDK while we can using the console, gcloud or API.

There should be a properties part of RouterBgpPeer class to be able to set the MD5 authentication key if desired.

Screen Shot 2022-10-13 at 12 40 24

Code example

Add property md5_authentication_key in bgp_peers block.

router_resource = {
    "bgp_peers": [
        {
            "name": routerName,
            "interface_name": "auto-ia-bgp-demo-gcp-interc-57debcee42b1581",
            "peer_ip_address": "169.254.205.177",
            "ip_address": "169.254.205.178",
            "peer_asn": 64512, 
            "md5_authentication_key": "secret"
        }
    ]
}

# Update the google cloud router
operation = client_routers.patch(project=project_id, region=region,
                         router=routerName, router_resource=router_resource)
response_json = MessageToDict(operation._pb)
rjouhann commented 2 years ago

November 01, 2022 The Cloud Router BGP MD5 authentication feature is Generally Available (GA).

Why did you call this feature GA when this is not possible to set up MD5 auth using the Google Cloud Python SDK? Any chance to get this gap addressed by end of this quarter?

Thanks & Regards, Romain

parthea commented 2 years ago

I apologize for the delay in releasing this feature. The feature was merged in https://github.com/googleapis/python-compute/pull/355. We are currently in a release freeze due to the Black Friday period. We will publish a new version on November 30th when the release freeze ends.

parthea commented 1 year ago

I apologize for the late release. I'm going to close this as completed but please feel free to re-open this issue. https://pypi.org/project/google-cloud-compute/1.7.0/

rjouhann commented 1 year ago

Hello @parthea,

Could you let me know when the documentation will be updated and how to update the md5_authentication_key in compute_v1.RoutersClient() RouterBgpPeer Class?

Sounds like the new property for was called "md5_authentication_key_name": "md5_authentication_key_name_value",

PS: I cannot re-open the issue but only add a new comment

Thanks & Regards, Romain

parthea commented 1 year ago

The documentation has been updated. You should see md5_authentication_key_name as an attribute for RouterBgpPeer: https://cloud.google.com/python/docs/reference/compute/latest/google.cloud.compute_v1.types.RouterBgpPeer

Let me know if you have any trouble updating the md5_authentication_key_name attribute of RouterBgpPeer.