dimgal1 commented on code in PR #1667:
URL: https://github.com/apache/libcloud/pull/1667#discussion_r848500552
##########
libcloud/container/drivers/kubernetes.py:
##########
@@ -30,20 +33,178 @@
from libcloud.container.providers import Provider
from libcloud.container.types import ContainerState
-__all__ = ["KubernetesContainerDriver"]
+from libcloud.compute.types import NodeState
+from libcloud.compute.base import Node
+from libcloud.compute.base import NodeSize
+from libcloud.compute.base import NodeImage
+from libcloud.common.exceptions import BaseHTTPError
+
+__all__ = [
+ "KubernetesContainerDriver",
+ "to_n_bytes",
+ "to_memory_str",
+ "to_cpu_str",
+ "to_n_cpus",
+]
ROOT_URL = "/api/"
+K8S_UNIT_MAP = OrderedDict(
+ {
+ "K": 1000,
+ "Ki": 1024,
+ "M": 1000 * 1000,
+ "Mi": 1024 * 1024,
+ "G": 1000 * 1000 * 1000,
+ "Gi": 1024 * 1024 * 1024,
+ }
+)
+
+
+def to_n_bytes(memory_str: str) -> int:
Review Comment:
Sorry for the delay, I added the test cases
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]