MCPcopy Index your code
hub / github.com/SpaceNetLab/StarryNet / get_IP

Method get_IP

starrynet/sn_synchronizer.py:182–190  ·  view source on GitHub ↗
(self, sat_index)

Source from the content-addressed store, hash-verified

180 return ADJ[sat_index - 1]
181
182 def get_IP(self, sat_index):
183 IP_info = sn_remote_cmd(
184 self.remote_ssh, "docker inspect" +
185 " --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}\n{{end}}'"
186 + " ovs_container_" + str(sat_index))
187 ip_list = []
188 for i in range(len(IP_info) - 2):
189 ip_list.append(IP_info[i].split()[0])
190 return ip_list
191
192 def set_damage(self, damaging_ratio, time_index):
193 self.damage_ratio.append(damaging_ratio)

Callers 2

example.pyFile · 0.80
do_get_IPMethod · 0.80

Calls 1

sn_remote_cmdFunction · 0.85

Tested by

no test coverage detected