+ def _get_network(self, net_name):
+ """Retrieves the network object, searching by name
+
+ :param net_name: (str) replication controller name
+ :return: (dict) network information (name)
+ """
+ network = self._networks.get(net_name)
+ if not network:
+ return
+ return {'name': net_name}
+
+ def _get_interfaces(self, rc_name):
+ """Retrieves the network list of a replication controller
+
+ :param rc_name: (str) replication controller name
+ :return: (dict) names and information of the networks used in this
+ replication controller; those networks must be defined in the
+ Kubernetes cluster
+ """
+ rc = self.template.get_rc_by_name(rc_name)
+ if not rc:
+ return {}
+ return {name: {'network_name': name,
+ 'local_mac': None,
+ 'local_ip': None}
+ for name in rc.networks}