@@ -366,6 +366,7 @@ async def list_servers(
366
366
name : Optional [str ] = None ,
367
367
private_ip : Optional [str ] = None ,
368
368
without_ip : Optional [bool ] = None ,
369
+ with_ip : Optional [str ] = None ,
369
370
commercial_type : Optional [str ] = None ,
370
371
state : Optional [ServerState ] = None ,
371
372
tags : Optional [List [str ]] = None ,
@@ -386,6 +387,7 @@ async def list_servers(
386
387
:param name: Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo").
387
388
:param private_ip: List Instances by private_ip.
388
389
:param without_ip: List Instances that are not attached to a public IP.
390
+ :param with_ip: List Instances by IP (both private_ip and public_ip are supported).
389
391
:param commercial_type: List Instances of this commercial type.
390
392
:param state: List Instances in this state.
391
393
:param tags: List Instances with these exact tags (to filter with several tags, use commas to separate them).
@@ -424,6 +426,7 @@ async def list_servers(
424
426
"servers" : "," .join (servers ) if servers and len (servers ) > 0 else None ,
425
427
"state" : state ,
426
428
"tags" : "," .join (tags ) if tags and len (tags ) > 0 else None ,
429
+ "with_ip" : with_ip ,
427
430
"without_ip" : without_ip ,
428
431
},
429
432
)
@@ -442,6 +445,7 @@ async def list_servers_all(
442
445
name : Optional [str ] = None ,
443
446
private_ip : Optional [str ] = None ,
444
447
without_ip : Optional [bool ] = None ,
448
+ with_ip : Optional [str ] = None ,
445
449
commercial_type : Optional [str ] = None ,
446
450
state : Optional [ServerState ] = None ,
447
451
tags : Optional [List [str ]] = None ,
@@ -462,6 +466,7 @@ async def list_servers_all(
462
466
:param name: Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo").
463
467
:param private_ip: List Instances by private_ip.
464
468
:param without_ip: List Instances that are not attached to a public IP.
469
+ :param with_ip: List Instances by IP (both private_ip and public_ip are supported).
465
470
:param commercial_type: List Instances of this commercial type.
466
471
:param state: List Instances in this state.
467
472
:param tags: List Instances with these exact tags (to filter with several tags, use commas to separate them).
@@ -491,6 +496,7 @@ async def list_servers_all(
491
496
"name" : name ,
492
497
"private_ip" : private_ip ,
493
498
"without_ip" : without_ip ,
499
+ "with_ip" : with_ip ,
494
500
"commercial_type" : commercial_type ,
495
501
"state" : state ,
496
502
"tags" : tags ,
@@ -507,12 +513,12 @@ async def _create_server(
507
513
* ,
508
514
commercial_type : str ,
509
515
image : str ,
510
- enable_ipv6 : bool ,
511
516
zone : Optional [Zone ] = None ,
512
517
name : Optional [str ] = None ,
513
518
dynamic_ip_required : Optional [bool ] = None ,
514
519
routed_ip_enabled : Optional [bool ] = None ,
515
520
volumes : Optional [Dict [str , VolumeServerTemplate ]] = None ,
521
+ enable_ipv6 : Optional [bool ] = None ,
516
522
public_ip : Optional [str ] = None ,
517
523
public_ips : Optional [List [str ]] = None ,
518
524
boot_type : Optional [BootType ] = None ,
@@ -529,12 +535,12 @@ async def _create_server(
529
535
Get more information in the [Technical Information](#technical-information) section of the introduction.
530
536
:param commercial_type: Define the Instance commercial type (i.e. GP1-S).
531
537
:param image: Instance image ID or label.
532
- :param enable_ipv6: True if IPv6 is enabled on the server.
533
538
:param zone: Zone to target. If none is passed will use default zone from the config.
534
539
:param name: Instance name.
535
540
:param dynamic_ip_required: Define if a dynamic IPv4 is required for the Instance.
536
541
:param routed_ip_enabled: If true, configure the Instance so it uses the new routed IP mode.
537
542
:param volumes: Volumes attached to the server.
543
+ :param enable_ipv6: True if IPv6 is enabled on the server (deprecated and always `False` when `routed_ip_enabled` is `True`).
538
544
:param public_ip: ID of the reserved IP to attach to the Instance.
539
545
:param public_ips: A list of reserved IP IDs to attach to the Instance.
540
546
:param boot_type: Boot type to use.
@@ -554,7 +560,6 @@ async def _create_server(
554
560
result = await api._create_server(
555
561
commercial_type="example",
556
562
image="example",
557
- enable_ipv6=False,
558
563
)
559
564
"""
560
565
@@ -565,14 +570,14 @@ async def _create_server(
565
570
f"/instance/v1/zones/{ param_zone } /servers" ,
566
571
body = marshal_CreateServerRequest (
567
572
CreateServerRequest (
568
- zone = zone ,
569
573
commercial_type = commercial_type ,
570
574
image = image ,
575
+ zone = zone ,
571
576
name = name or random_name (prefix = "srv" ),
572
577
dynamic_ip_required = dynamic_ip_required ,
573
578
routed_ip_enabled = routed_ip_enabled ,
574
- enable_ipv6 = enable_ipv6 ,
575
579
volumes = volumes ,
580
+ enable_ipv6 = enable_ipv6 ,
576
581
public_ip = public_ip ,
577
582
public_ips = public_ips ,
578
583
boot_type = boot_type ,
@@ -660,14 +665,14 @@ async def _set_server(
660
665
name : str ,
661
666
commercial_type : str ,
662
667
dynamic_ip_required : bool ,
663
- enable_ipv6 : bool ,
664
668
hostname : str ,
665
669
organization : Optional [str ] = None ,
666
670
project : Optional [str ] = None ,
667
671
allowed_actions : Optional [List [ServerAction ]] = None ,
668
672
tags : Optional [List [str ]] = None ,
669
673
creation_date : Optional [datetime ] = None ,
670
674
routed_ip_enabled : Optional [bool ] = None ,
675
+ enable_ipv6 : Optional [bool ] = None ,
671
676
image : Optional [Image ] = None ,
672
677
protected : bool ,
673
678
private_ip : Optional [str ] = None ,
@@ -693,24 +698,24 @@ async def _set_server(
693
698
:param name: Instance name.
694
699
:param commercial_type: Instance commercial type (eg. GP1-M).
695
700
:param dynamic_ip_required: True if a dynamic IPv4 is required.
696
- :param enable_ipv6: True if IPv6 is enabled.
697
701
:param hostname: Instance host name.
698
702
:param organization: Instance Organization ID.
699
703
:param project: Instance Project ID.
700
704
:param allowed_actions: Provide a list of allowed actions on the server.
701
705
:param tags: Tags associated with the Instance.
702
706
:param creation_date: Instance creation date.
703
707
:param routed_ip_enabled: True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
708
+ :param enable_ipv6: True if IPv6 is enabled (deprecated and always `False` when `routed_ip_enabled` is `True`).
704
709
:param image: Provide information on the Instance image.
705
710
:param protected: Instance protection option is activated.
706
- :param private_ip: Instance private IP address.
707
- :param public_ip: Information about the public IP.
711
+ :param private_ip: Instance private IP address (deprecated and always `null` when `routed_ip_enabled` is `True`) .
712
+ :param public_ip: Information about the public IP (deprecated in favor of `public_ips`) .
708
713
:param public_ips: Information about all the public IPs attached to the server.
709
714
:param modification_date: Instance modification date.
710
715
:param state_detail: Instance state_detail.
711
716
:param state: Instance state.
712
717
:param location: Instance location.
713
- :param ipv6: Instance IPv6 address.
718
+ :param ipv6: Instance IPv6 address (deprecated when `routed_ip_enabled` is `True`) .
714
719
:param bootscript: Instance bootscript.
715
720
:param boot_type: Instance boot type.
716
721
:param volumes: Instance volumes.
@@ -729,7 +734,6 @@ async def _set_server(
729
734
name="example",
730
735
commercial_type="example",
731
736
dynamic_ip_required=False,
732
- enable_ipv6=False,
733
737
hostname="example",
734
738
protected=False,
735
739
state_detail="example",
@@ -749,14 +753,14 @@ async def _set_server(
749
753
name = name ,
750
754
commercial_type = commercial_type ,
751
755
dynamic_ip_required = dynamic_ip_required ,
752
- enable_ipv6 = enable_ipv6 ,
753
756
hostname = hostname ,
754
757
organization = organization ,
755
758
project = project ,
756
759
allowed_actions = allowed_actions ,
757
760
tags = tags ,
758
761
creation_date = creation_date ,
759
762
routed_ip_enabled = routed_ip_enabled ,
763
+ enable_ipv6 = enable_ipv6 ,
760
764
image = image ,
761
765
protected = protected ,
762
766
private_ip = private_ip ,
0 commit comments