diff --git a/riocli/network/model.py b/riocli/network/model.py index 831e131e..b2671f80 100644 --- a/riocli/network/model.py +++ b/riocli/network/model.py @@ -17,6 +17,7 @@ from rapyuta_io import Client from rapyuta_io.clients.native_network import NativeNetwork, Parameters as NativeNetworkParameters from rapyuta_io.clients.routed_network import RoutedNetwork, Parameters as RoutedNetworkParameters +from rapyuta_io.clients.common_models import Limits from riocli.model import Model from riocli.network.util import find_network_name, NetworkNotFound @@ -73,6 +74,9 @@ def to_v1(self, client: Client) -> NativeNetwork: return NativeNetwork(self.metadata.name, self.spec.runtime.lower(), self.spec.rosDistro, parameters=parameters) + def _get_limits(self): + return Limits(self.spec.resourceLimits['cpu'], self.spec.resourceLimits['memory']) + def _create_routed_network(self, client: Client) -> RoutedNetwork: if self.spec.runtime == 'cloud': network = self._create_cloud_routed_network(client)