@@ -366,6 +366,7 @@ async def list_servers(
366366 name : Optional [str ] = None ,
367367 private_ip : Optional [str ] = None ,
368368 without_ip : Optional [bool ] = None ,
369+ with_ip : Optional [str ] = None ,
369370 commercial_type : Optional [str ] = None ,
370371 state : Optional [ServerState ] = None ,
371372 tags : Optional [List [str ]] = None ,
@@ -386,6 +387,7 @@ async def list_servers(
386387 :param name: Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo").
387388 :param private_ip: List Instances by private_ip.
388389 :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).
389391 :param commercial_type: List Instances of this commercial type.
390392 :param state: List Instances in this state.
391393 :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(
424426 "servers" : "," .join (servers ) if servers and len (servers ) > 0 else None ,
425427 "state" : state ,
426428 "tags" : "," .join (tags ) if tags and len (tags ) > 0 else None ,
429+ "with_ip" : with_ip ,
427430 "without_ip" : without_ip ,
428431 },
429432 )
@@ -442,6 +445,7 @@ async def list_servers_all(
442445 name : Optional [str ] = None ,
443446 private_ip : Optional [str ] = None ,
444447 without_ip : Optional [bool ] = None ,
448+ with_ip : Optional [str ] = None ,
445449 commercial_type : Optional [str ] = None ,
446450 state : Optional [ServerState ] = None ,
447451 tags : Optional [List [str ]] = None ,
@@ -462,6 +466,7 @@ async def list_servers_all(
462466 :param name: Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo").
463467 :param private_ip: List Instances by private_ip.
464468 :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).
465470 :param commercial_type: List Instances of this commercial type.
466471 :param state: List Instances in this state.
467472 :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(
491496 "name" : name ,
492497 "private_ip" : private_ip ,
493498 "without_ip" : without_ip ,
499+ "with_ip" : with_ip ,
494500 "commercial_type" : commercial_type ,
495501 "state" : state ,
496502 "tags" : tags ,
@@ -507,12 +513,12 @@ async def _create_server(
507513 * ,
508514 commercial_type : str ,
509515 image : str ,
510- enable_ipv6 : bool ,
511516 zone : Optional [Zone ] = None ,
512517 name : Optional [str ] = None ,
513518 dynamic_ip_required : Optional [bool ] = None ,
514519 routed_ip_enabled : Optional [bool ] = None ,
515520 volumes : Optional [Dict [str , VolumeServerTemplate ]] = None ,
521+ enable_ipv6 : Optional [bool ] = None ,
516522 public_ip : Optional [str ] = None ,
517523 public_ips : Optional [List [str ]] = None ,
518524 boot_type : Optional [BootType ] = None ,
@@ -529,12 +535,12 @@ async def _create_server(
529535 Get more information in the [Technical Information](#technical-information) section of the introduction.
530536 :param commercial_type: Define the Instance commercial type (i.e. GP1-S).
531537 :param image: Instance image ID or label.
532- :param enable_ipv6: True if IPv6 is enabled on the server.
533538 :param zone: Zone to target. If none is passed will use default zone from the config.
534539 :param name: Instance name.
535540 :param dynamic_ip_required: Define if a dynamic IPv4 is required for the Instance.
536541 :param routed_ip_enabled: If true, configure the Instance so it uses the new routed IP mode.
537542 :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`).
538544 :param public_ip: ID of the reserved IP to attach to the Instance.
539545 :param public_ips: A list of reserved IP IDs to attach to the Instance.
540546 :param boot_type: Boot type to use.
@@ -554,7 +560,6 @@ async def _create_server(
554560 result = await api._create_server(
555561 commercial_type="example",
556562 image="example",
557- enable_ipv6=False,
558563 )
559564 """
560565
@@ -565,14 +570,14 @@ async def _create_server(
565570 f"/instance/v1/zones/{ param_zone } /servers" ,
566571 body = marshal_CreateServerRequest (
567572 CreateServerRequest (
568- zone = zone ,
569573 commercial_type = commercial_type ,
570574 image = image ,
575+ zone = zone ,
571576 name = name or random_name (prefix = "srv" ),
572577 dynamic_ip_required = dynamic_ip_required ,
573578 routed_ip_enabled = routed_ip_enabled ,
574- enable_ipv6 = enable_ipv6 ,
575579 volumes = volumes ,
580+ enable_ipv6 = enable_ipv6 ,
576581 public_ip = public_ip ,
577582 public_ips = public_ips ,
578583 boot_type = boot_type ,
@@ -660,14 +665,14 @@ async def _set_server(
660665 name : str ,
661666 commercial_type : str ,
662667 dynamic_ip_required : bool ,
663- enable_ipv6 : bool ,
664668 hostname : str ,
665669 organization : Optional [str ] = None ,
666670 project : Optional [str ] = None ,
667671 allowed_actions : Optional [List [ServerAction ]] = None ,
668672 tags : Optional [List [str ]] = None ,
669673 creation_date : Optional [datetime ] = None ,
670674 routed_ip_enabled : Optional [bool ] = None ,
675+ enable_ipv6 : Optional [bool ] = None ,
671676 image : Optional [Image ] = None ,
672677 protected : bool ,
673678 private_ip : Optional [str ] = None ,
@@ -693,24 +698,24 @@ async def _set_server(
693698 :param name: Instance name.
694699 :param commercial_type: Instance commercial type (eg. GP1-M).
695700 :param dynamic_ip_required: True if a dynamic IPv4 is required.
696- :param enable_ipv6: True if IPv6 is enabled.
697701 :param hostname: Instance host name.
698702 :param organization: Instance Organization ID.
699703 :param project: Instance Project ID.
700704 :param allowed_actions: Provide a list of allowed actions on the server.
701705 :param tags: Tags associated with the Instance.
702706 :param creation_date: Instance creation date.
703707 :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`).
704709 :param image: Provide information on the Instance image.
705710 :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`) .
708713 :param public_ips: Information about all the public IPs attached to the server.
709714 :param modification_date: Instance modification date.
710715 :param state_detail: Instance state_detail.
711716 :param state: Instance state.
712717 :param location: Instance location.
713- :param ipv6: Instance IPv6 address.
718+ :param ipv6: Instance IPv6 address (deprecated when `routed_ip_enabled` is `True`) .
714719 :param bootscript: Instance bootscript.
715720 :param boot_type: Instance boot type.
716721 :param volumes: Instance volumes.
@@ -729,7 +734,6 @@ async def _set_server(
729734 name="example",
730735 commercial_type="example",
731736 dynamic_ip_required=False,
732- enable_ipv6=False,
733737 hostname="example",
734738 protected=False,
735739 state_detail="example",
@@ -749,14 +753,14 @@ async def _set_server(
749753 name = name ,
750754 commercial_type = commercial_type ,
751755 dynamic_ip_required = dynamic_ip_required ,
752- enable_ipv6 = enable_ipv6 ,
753756 hostname = hostname ,
754757 organization = organization ,
755758 project = project ,
756759 allowed_actions = allowed_actions ,
757760 tags = tags ,
758761 creation_date = creation_date ,
759762 routed_ip_enabled = routed_ip_enabled ,
763+ enable_ipv6 = enable_ipv6 ,
760764 image = image ,
761765 protected = protected ,
762766 private_ip = private_ip ,
0 commit comments