@@ -305,7 +305,7 @@ def test_nb_with_backend_only(test_linode_client, create_vpc_with_subnet):
305305 nb = client .nodebalancer_create (
306306 region = create_vpc_with_subnet [0 ].region ,
307307 label = label ,
308- vpcs = [
308+ backend_vpcs = [
309309 {
310310 "vpc_id" : create_vpc_with_subnet [0 ].id ,
311311 "subnet_id" : create_vpc_with_subnet [1 ].id ,
@@ -471,7 +471,7 @@ def test_nb_with_frontend_and_backend_in_different_vpcs(
471471 nb = client .nodebalancer_create (
472472 region = region ,
473473 label = label ,
474- vpcs = [{"vpc_id" : vpc_backend , "subnet_id" : subnet_backend }],
474+ backend_vpcs = [{"vpc_id" : vpc_backend , "subnet_id" : subnet_backend }],
475475 frontend_vpcs = [
476476 {
477477 "subnet_id" : subnet_frontend .id ,
@@ -508,3 +508,30 @@ def test_nb_with_frontend_and_backend_in_different_vpcs(
508508
509509 nb .delete ()
510510 vpc_frontend .delete ()
511+
512+
513+ def test_nb_with_deprecated_vpcs_attribute (
514+ test_linode_client , create_vpc_with_subnet
515+ ):
516+ # TODO: The test will be deleted when a deprecated vpcs attribute can no longer be used
517+ client = test_linode_client
518+ label = get_test_label (8 )
519+
520+ nb = client .nodebalancer_create (
521+ region = create_vpc_with_subnet [0 ].region ,
522+ label = label ,
523+ vpcs = [
524+ {
525+ "subnet_id" : create_vpc_with_subnet [1 ].id ,
526+ }
527+ ],
528+ )
529+
530+ assert isinstance (
531+ ipaddress .ip_address (nb .ipv4 .address ), ipaddress .IPv4Address
532+ )
533+ assert isinstance (ipaddress .ip_address (nb .ipv6 ), ipaddress .IPv6Address )
534+ assert nb .frontend_address_type == "public"
535+ assert nb .frontend_vpc_subnet_id is None
536+
537+ nb .delete ()
0 commit comments