def get_ports(self):
ports = []<EOL>container_ports = self.inspect(refresh=True)["<STR_LIT>"]["<STR_LIT>"]<EOL>if not container_ports:<EOL><INDENT>return ports<EOL><DEDENT>for p in container_ports:<EOL><INDENT>ports.append(p.split("<STR_LIT:/>")[<NUM_LIT:0>])<EOL><DEDENT>return ports<EOL>
get ports specified in container metadata

:return: list of str