2222from linode_api4 .objects .base import MappedObject
2323from linode_api4 .objects .filtering import FilterableAttribute
2424from linode_api4 .objects .networking import IPAddress , IPv6Range , VPCIPAddress
25- from linode_api4 .objects .serializable import StrEnum
2625from linode_api4 .objects .vpc import VPC , VPCSubnet
2726from linode_api4 .paginated_list import PaginatedList
2827
2928PASSWORD_CHARS = string .ascii_letters + string .digits + string .punctuation
3029
3130
32- class InstanceDiskEncryptionType (StrEnum ):
33- """
34- InstanceDiskEncryptionType defines valid values for the
35- Instance(...).disk_encryption field.
36-
37- API Documentation: TODO
38- """
39-
40- enabled = "enabled"
41- disabled = "disabled"
42-
43-
4431class Backup (DerivedBase ):
4532 """
4633 A Backup of a Linode Instance.
@@ -127,7 +114,6 @@ class Disk(DerivedBase):
127114 "filesystem" : Property (),
128115 "updated" : Property (is_datetime = True ),
129116 "linode_id" : Property (identifier = True ),
130- "disk_encryption" : Property (),
131117 }
132118
133119 def duplicate (self ):
@@ -676,8 +662,6 @@ class Instance(Base):
676662 "host_uuid" : Property (),
677663 "watchdog_enabled" : Property (mutable = True ),
678664 "has_user_data" : Property (),
679- "disk_encryption" : Property (),
680- "lke_cluster_id" : Property (),
681665 }
682666
683667 @property
@@ -1407,16 +1391,7 @@ def ip_allocate(self, public=False):
14071391 i = IPAddress (self ._client , result ["address" ], result )
14081392 return i
14091393
1410- def rebuild (
1411- self ,
1412- image ,
1413- root_pass = None ,
1414- authorized_keys = None ,
1415- disk_encryption : Optional [
1416- Union [InstanceDiskEncryptionType , str ]
1417- ] = None ,
1418- ** kwargs ,
1419- ):
1394+ def rebuild (self , image , root_pass = None , authorized_keys = None , ** kwargs ):
14201395 """
14211396 Rebuilding an Instance deletes all existing Disks and Configs and deploys
14221397 a new :any:`Image` to it. This can be used to reset an existing
@@ -1434,8 +1409,6 @@ def rebuild(
14341409 be a single key, or a path to a file containing
14351410 the key.
14361411 :type authorized_keys: list or str
1437- :param disk_encryption: The disk encryption policy for this Linode.
1438- :type disk_encryption: InstanceDiskEncryptionType or str
14391412
14401413 :returns: The newly generated password, if one was not provided
14411414 (otherwise True)
@@ -1453,10 +1426,6 @@ def rebuild(
14531426 "root_pass" : root_pass ,
14541427 "authorized_keys" : authorized_keys ,
14551428 }
1456-
1457- if disk_encryption is not None :
1458- params ["disk_encryption" ] = str (disk_encryption )
1459-
14601429 params .update (kwargs )
14611430
14621431 result = self ._client .post (
@@ -1786,22 +1755,6 @@ def stats(self):
17861755 "{}/stats" .format (Instance .api_endpoint ), model = self
17871756 )
17881757
1789- @property
1790- def lke_cluster (self ) -> Optional ["LKECluster" ]:
1791- """
1792- Returns the LKE Cluster this Instance is a node of.
1793-
1794- :returns: The LKE Cluster this Instance is a node of.
1795- :rtype: Optional[LKECluster]
1796- """
1797-
1798- # Local import to prevent circular dependency
1799- from linode_api4 .objects .lke import ( # pylint: disable=import-outside-toplevel
1800- LKECluster ,
1801- )
1802-
1803- return LKECluster (self ._client , self .lke_cluster_id )
1804-
18051758 def stats_for (self , dt ):
18061759 """
18071760 Returns stats for the month containing the given datetime
0 commit comments