Skip to content

Commit 003bab0

Browse files
authored
feat(release): Update SDK to use API released on 2024-04-30 (#63)
Signed-off-by: Deepak Selvakumar <[email protected]>
1 parent ed7e7d2 commit 003bab0

File tree

5 files changed

+17523
-12406
lines changed

5 files changed

+17523
-12406
lines changed

examples/test_vpc_v1_examples.py

Lines changed: 88 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4813,13 +4813,47 @@ def test_create_vpn_gateway_connection_example(self):
48134813
print('\ncreate_vpn_gateway_connection() result:')
48144814
# begin-create_vpn_gateway_connection
48154815

4816-
vpn_gateway_connection_prototype_model = {}
4817-
vpn_gateway_connection_prototype_model['peer_address'] = '192.132.5.0'
4818-
vpn_gateway_connection_prototype_model['psk'] = 'lkj14b1oi0alcniejkso'
4819-
vpn_gateway_connection_prototype_model['name'] = 'my-vpn-connection'
4820-
vpn_gateway_connection_prototype_model['peer_cidrs'] = ['197.155.0.0/28']
4821-
vpn_gateway_connection_prototype_model['local_cidrs'] = ['192.132.0.0/28']
4822-
vpn_gateway_connection_prototype_model['admin_state_up'] = True
4816+
# Construct a dict representation of a VPNGatewayConnectionDPDPrototype model
4817+
vpn_gateway_connection_dpd_prototype_model = {
4818+
'action': 'restart',
4819+
'interval': 30,
4820+
'timeout': 120,
4821+
}
4822+
# Construct a dict representation of a VPNGatewayConnectionIKEPolicyPrototypeIKEPolicyIdentityById model
4823+
vpn_gateway_connection_ike_policy_prototype_model = {
4824+
'id': 'ddf51bec-3424-11e8-b467-0ed5f89f718b',
4825+
}
4826+
# Construct a dict representation of a VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityById model
4827+
vpn_gateway_connection_i_psec_policy_prototype_model = {
4828+
'id': 'ddf51bec-3424-11e8-b467-0ed5f89f718b',
4829+
}
4830+
# Construct a dict representation of a VPNGatewayConnectionIKEIdentityPrototypeVPNGatewayConnectionIKEIdentityFQDN model
4831+
vpn_gateway_connection_ike_identity_prototype_model = {
4832+
'type': 'fqdn',
4833+
'value': 'my-service.example.com',
4834+
}
4835+
# Construct a dict representation of a VPNGatewayConnectionStaticRouteModeLocalPrototype model
4836+
vpn_gateway_connection_static_route_mode_local_prototype_model = {
4837+
'ike_identities': [vpn_gateway_connection_ike_identity_prototype_model],
4838+
}
4839+
# Construct a dict representation of a VPNGatewayConnectionStaticRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress model
4840+
vpn_gateway_connection_static_route_mode_peer_prototype_model = {
4841+
'ike_identity': vpn_gateway_connection_ike_identity_prototype_model,
4842+
'address': '169.21.50.5',
4843+
}
4844+
# Construct a dict representation of a VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype model
4845+
vpn_gateway_connection_prototype_model = {
4846+
'admin_state_up': True,
4847+
'dead_peer_detection': vpn_gateway_connection_dpd_prototype_model,
4848+
'establish_mode': 'bidirectional',
4849+
'ike_policy': vpn_gateway_connection_ike_policy_prototype_model,
4850+
'ipsec_policy': vpn_gateway_connection_i_psec_policy_prototype_model,
4851+
'name': 'my-vpn-connection',
4852+
'psk': 'lkj14b1oi0alcniejkso',
4853+
'local': vpn_gateway_connection_static_route_mode_local_prototype_model,
4854+
'peer': vpn_gateway_connection_static_route_mode_peer_prototype_model,
4855+
'routing_protocol': 'none',
4856+
}
48234857

48244858
vpn_gateway_connection = vpc_service.create_vpn_gateway_connection(
48254859
vpn_gateway_id=data['vpnGatewayId'],
@@ -4882,118 +4916,115 @@ def test_update_vpn_gateway_connection_example(self):
48824916
pytest.fail(str(e))
48834917

48844918
@needscredentials
4885-
def test_add_vpn_gateway_connection_local_cidr_example(self):
4919+
def test_add_vpn_gateway_connections_local_cidr_example(self):
48864920
"""
4887-
add_vpn_gateway_connection_local_cidr request example
4921+
add_vpn_gateway_connections_local_cidr request example
48884922
"""
48894923
try:
4890-
# begin-add_vpn_gateway_connection_local_cidr
4924+
# begin-add_vpn_gateway_connections_local_cidr
48914925

4892-
response = vpc_service.add_vpn_gateway_connection_local_cidr(
4926+
response = vpc_service.add_vpn_gateway_connections_local_cidr(
48934927
vpn_gateway_id=data['vpnGatewayId'],
48944928
id=data['vpnGatewayConnectionId'],
48954929
cidr_prefix='192.134.0.0',
48964930
prefix_length='28')
48974931

4898-
# end-add_vpn_gateway_connection_local_cidr
4932+
# end-add_vpn_gateway_connections_local_cidr
48994933
assert response is not None
49004934

49014935
except ApiException as e:
49024936
pytest.fail(str(e))
49034937

49044938
@needscredentials
4905-
def test_list_vpn_gateway_connection_local_cidrs_example(self):
4939+
def test_list_vpn_gateway_connections_local_cidrs_example(self):
49064940
"""
4907-
list_vpn_gateway_connection_local_cidrs request example
4941+
list_vpn_gateway_connections_local_cidrs request example
49084942
"""
49094943
try:
4910-
print('\nlist_vpn_gateway_connection_local_cidrs() result:')
4911-
# begin-list_vpn_gateway_connection_local_cidrs
4944+
print('\nlist_vpn_gateway_connections_local_cidrs() result:')
4945+
# begin-list_vpn_gateway_connections_local_cidrs
49124946

4913-
vpn_gateway_connection_local_cid_rs = vpc_service.list_vpn_gateway_connection_local_cidrs(
4947+
vpn_gateway_connection_local_cid_rs = vpc_service.list_vpn_gateway_connections_local_cidrs(
49144948
vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId']).get_result()
49154949

4916-
# end-list_vpn_gateway_connection_local_cidrs
4950+
# end-list_vpn_gateway_connections_local_cidrs
49174951

49184952
assert vpn_gateway_connection_local_cid_rs is not None
49194953

49204954
except ApiException as e:
49214955
pytest.fail(str(e))
49224956

49234957
@needscredentials
4924-
def test_add_vpn_gateway_connection_peer_cidr_example(self):
4958+
def test_add_vpn_gateway_connections_peer_cidr_example(self):
49254959
"""
4926-
add_vpn_gateway_connection_peer_cidr request example
4960+
add_vpn_gateway_connections_peer_cidr request example
49274961
"""
49284962
try:
4929-
# begin-add_vpn_gateway_connection_peer_cidr
4963+
# begin-add_vpn_gateway_connections_peer_cidr
49304964

4931-
response = vpc_service.add_vpn_gateway_connection_peer_cidr(
4965+
response = vpc_service.add_vpn_gateway_connections_peer_cidr(
49324966
vpn_gateway_id=data['vpnGatewayId'],
49334967
id=data['vpnGatewayConnectionId'],
4934-
cidr_prefix='192.144.0.0',
4935-
prefix_length='28')
4968+
cidr='192.144.0.0/28')
49364969

4937-
# end-add_vpn_gateway_connection_peer_cidr
4970+
# end-add_vpn_gateway_connections_peer_cidr
49384971
assert response is not None
49394972

49404973
except ApiException as e:
49414974
pytest.fail(str(e))
49424975

49434976
@needscredentials
4944-
def test_check_vpn_gateway_connection_local_cidr_example(self):
4977+
def test_check_vpn_gateway_connections_local_cidr_example(self):
49454978
"""
4946-
check_vpn_gateway_connection_local_cidr request example
4979+
check_vpn_gateway_connections_local_cidr request example
49474980
"""
49484981
try:
4949-
# begin-check_vpn_gateway_connection_local_cidr
4982+
# begin-check_vpn_gateway_connections_local_cidr
49504983

4951-
response = vpc_service.check_vpn_gateway_connection_local_cidr(
4984+
response = vpc_service.check_vpn_gateway_connections_local_cidr(
49524985
vpn_gateway_id=data['vpnGatewayId'],
49534986
id=data['vpnGatewayConnectionId'],
4954-
cidr_prefix='192.134.0.0',
4955-
prefix_length='28')
4987+
cidr='192.144.0.0/28')
49564988

4957-
# end-check_vpn_gateway_connection_local_cidr
4989+
# end-check_vpn_gateway_connections_local_cidr
49584990
assert response is not None
49594991

49604992
except ApiException as e:
49614993
pytest.fail(str(e))
49624994

49634995
@needscredentials
4964-
def test_list_vpn_gateway_connection_peer_cidrs_example(self):
4996+
def test_list_vpn_gateway_connections_peer_cidrs_example(self):
49654997
"""
4966-
list_vpn_gateway_connection_peer_cidrs request example
4998+
list_vpn_gateway_connections_peer_cidrs request example
49674999
"""
49685000
try:
4969-
print('\nlist_vpn_gateway_connection_peer_cidrs() result:')
4970-
# begin-list_vpn_gateway_connection_peer_cidrs
5001+
print('\nlist_vpn_gateway_connections_peer_cidrs() result:')
5002+
# begin-list_vpn_gateway_connections_peer_cidrs
49715003

4972-
vpn_gateway_connection_peer_cid_rs = vpc_service.list_vpn_gateway_connection_peer_cidrs(
5004+
vpn_gateway_connection_peer_cid_rs = vpc_service.list_vpn_gateway_connections_peer_cidrs(
49735005
vpn_gateway_id=data['vpnGatewayId'], id=data['vpnGatewayConnectionId']).get_result()
49745006

4975-
# end-list_vpn_gateway_connection_peer_cidrs
5007+
# end-list_vpn_gateway_connections_peer_cidrs
49765008

49775009
assert vpn_gateway_connection_peer_cid_rs is not None
49785010

49795011
except ApiException as e:
49805012
pytest.fail(str(e))
49815013

49825014
@needscredentials
4983-
def test_check_vpn_gateway_connection_peer_cidr_example(self):
5015+
def test_check_vpn_gateway_connections_peer_cidr_example(self):
49845016
"""
4985-
check_vpn_gateway_connection_peer_cidr request example
5017+
check_vpn_gateway_connections_peer_cidr request example
49865018
"""
49875019
try:
4988-
# begin-check_vpn_gateway_connection_peer_cidr
5020+
# begin-check_vpn_gateway_connections_peer_cidr
49895021

4990-
response = vpc_service.check_vpn_gateway_connection_peer_cidr(
5022+
response = vpc_service.check_vpn_gateway_connections_peer_cidr(
49915023
vpn_gateway_id=data['vpnGatewayId'],
49925024
id=data['vpnGatewayConnectionId'],
4993-
cidr_prefix='192.144.0.0',
4994-
prefix_length='28')
5025+
cidr='192.144.0.0/28')
49955026

4996-
# end-check_vpn_gateway_connection_peer_cidr
5027+
# end-check_vpn_gateway_connections_peer_cidr
49975028
assert response is not None
49985029

49995030
except ApiException as e:
@@ -7421,40 +7452,38 @@ def test_delete_flow_log_collector_example(self):
74217452
pytest.fail(str(e))
74227453

74237454
@needscredentials
7424-
def test_remove_vpn_gateway_connection_peer_cidr_example(self):
7455+
def test_remove_vpn_gateway_connections_peer_cidr_example(self):
74257456
"""
7426-
remove_vpn_gateway_connection_peer_cidr request example
7457+
remove_vpn_gateway_connections_peer_cidr request example
74277458
"""
74287459
try:
7429-
# begin-remove_vpn_gateway_connection_peer_cidr
7460+
# begin-remove_vpn_gateway_connections_peer_cidr
74307461

7431-
response = vpc_service.remove_vpn_gateway_connection_peer_cidr(
7462+
response = vpc_service.remove_vpn_gateway_connections_peer_cidr(
74327463
vpn_gateway_id=data['vpnGatewayId'],
74337464
id=data['vpnGatewayConnectionId'],
7434-
cidr_prefix='192.144.0.0',
7435-
prefix_length='28')
7465+
cidr='192.144.0.0/28')
74367466

7437-
# end-remove_vpn_gateway_connection_peer_cidr
7467+
# end-remove_vpn_gateway_connections_peer_cidr
74387468
assert response is not None
74397469

74407470
except ApiException as e:
74417471
pytest.fail(str(e))
74427472

74437473
@needscredentials
7444-
def test_remove_vpn_gateway_connection_local_cidr_example(self):
7474+
def test_remove_vpn_gateway_connections_local_cidr_example(self):
74457475
"""
7446-
remove_vpn_gateway_connection_local_cidr request example
7476+
remove_vpn_gateway_connections_local_cidr request example
74477477
"""
74487478
try:
7449-
# begin-remove_vpn_gateway_connection_local_cidr
7479+
# begin-remove_vpn_gateway_connections_local_cidr
74507480

7451-
response = vpc_service.remove_vpn_gateway_connection_local_cidr(
7481+
response = vpc_service.remove_vpn_gateway_connections_local_cidr(
74527482
vpn_gateway_id=data['vpnGatewayId'],
74537483
id=data['vpnGatewayConnectionId'],
7454-
cidr_prefix='192.134.0.0',
7455-
prefix_length='28')
7484+
cidr='192.144.0.0/28')
74567485

7457-
# end-remove_vpn_gateway_connection_local_cidr
7486+
# end-remove_vpn_gateway_connections_local_cidr
74587487
assert response is not None
74597488

74607489
except ApiException as e:

0 commit comments

Comments
 (0)