Commit d5dca49a authored by Tristan Cavelier's avatar Tristan Cavelier

fix some naming conventions

parent 11845745
......@@ -53,7 +53,6 @@ setup(name=name,
entry_points={
'console_scripts': [
'agent = slapos.agent.agent:main [agent]',
'is-local-tcp-port-opened = slapos.promise.islocaltcpportopened:main',
'clouddestroy = slapos.cloudmgr.destroy:main',
'cloudgetprivatekey = slapos.cloudmgr.getprivatekey:main',
'cloudgetpubliciplist = slapos.cloudmgr.getpubliciplist:main',
......@@ -63,6 +62,7 @@ setup(name=name,
'cloudstop = slapos.cloudmgr.stop:main',
'equeue = slapos.equeue:main',
'htpasswd = slapos.htpasswd:main',
'is-local-tcp-port-opened = slapos.promise.is_local_tcp_port_opened:main',
'killpidfromfile = slapos.systool:killpidfromfile',
'runResiliencyTest = slapos.resiliencytest:runResiliencyTest',
'runStandaloneResiliencyTest = slapos.resiliencytest:runStandaloneResiliencyTest',
......
......@@ -15,7 +15,7 @@ import socket
import struct
assert struct.calcsize('I') == 4
def is_local_tcp_port_opened(ip_address, port):
def isLocalTcpPortOpened(ip_address, port):
family = socket.getaddrinfo(ip_address, 0)[0][0]
conf = {
socket.AF_INET6: (4, "/proc/net/tcp6"),
......@@ -31,7 +31,7 @@ def is_local_tcp_port_opened(ip_address, port):
return any(full_addr_hex == line.split()[1] for line in open(tcp_path).readlines())
def main():
if is_local_tcp_port_opened(sys.argv[1], int(sys.argv[2])):
if isLocalTcpPortOpened(sys.argv[1], int(sys.argv[2])):
return 0
return 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment