22
33from linode_api4 .errors import UnexpectedResponseError
44from linode_api4 .groups import Group
5- from linode_api4 .objects .placement import PlacementGroup
5+ from linode_api4 .objects .placement import (
6+ PlacementGroup ,
7+ PlacementGroupPolicy ,
8+ PlacementGroupType ,
9+ )
610from linode_api4 .objects .region import Region
711
812
@@ -31,8 +35,8 @@ def group_create(
3135 self ,
3236 label : str ,
3337 region : Union [Region , str ],
34- affinity_type : str ,
35- is_strict : bool = False ,
38+ placement_group_type : PlacementGroupType ,
39+ placement_group_policy : PlacementGroupPolicy ,
3640 ** kwargs ,
3741 ) -> PlacementGroup :
3842 """
@@ -44,19 +48,19 @@ def group_create(
4448 :type label: str
4549 :param region: The region where the placement group will be created. Can be either a Region object or a string representing the region ID.
4650 :type region: Union[Region, str]
47- :param affinity_type : The affinity type of the placement group.
48- :type affinity_type: PlacementGroupAffinityType
49- :param is_strict: Whether the placement group is strict (defaults to False) .
50- :type is_strict: bool
51+ :param placement_group_type : The type of the placement group.
52+ :type placement_group_type: PlacementGroupType
53+ :param placement_group_policy: The policy for assignments to this placement group .
54+ :type placement_group_policy: PlacementGroupPolicy
5155
5256 :returns: The new Placement Group.
5357 :rtype: PlacementGroup
5458 """
5559 params = {
5660 "label" : label ,
5761 "region" : region .id if isinstance (region , Region ) else region ,
58- "affinity_type " : affinity_type ,
59- "is_strict " : is_strict ,
62+ "placement_group_type " : placement_group_type ,
63+ "placement_group_policy " : placement_group_policy ,
6064 }
6165
6266 params .update (kwargs )
0 commit comments