wso2am/1.9.1/plugins/wso2am-startup-handler.py
def read_proxy_port(self, port_mappings_str, port_mapping_name, port_mapping_protocol):
        """
        returns proxy port of the requested port mapping
        :return: void
        """
        # port mappings format: NAME:mgt-http|PROTOCOL:http|PORT:30001|PROXY_PORT:0|TYPE:NodePort;
        #                       NAME:mgt-https|PROTOCOL:https|PORT:30002|PROXY_PORT:0|TYPE:NodePort;
        #                       NAME:pt-http|PROTOCOL:http|PORT:30003|PROXY_PORT:8280|TYPE:ClientIP;
        #                       NAME:pt-https|PROTOCOL:https|PORT:30004|PROXY_PORT:8243|TYPE:NodePort

        service_proxy_port = None
        if port_mappings_str is not None:
            port_mappings_array = port_mappings_str.split(";")
            if port_mappings_array:

                for port_mapping in port_mappings_array:
                    name_value_array = port_mapping.split("|")
                    name = name_value_array[0].split(":")[1]
                    protocol = name_value_array[1].split(":")[1]
                    proxy_port = name_value_array[3].split(":")[1]
                    # If PROXY_PORT is not set, set PORT as the proxy port (ex:Kubernetes),
                    if proxy_port == '0':
                        proxy_port = name_value_array[2].split(":")[1]

                    if name == port_mapping_name and protocol == port_mapping_protocol:
                        service_proxy_port = proxy_port

        return service_proxy_port

        returns proxy port of the requested port mapping
        :return: void
        
returns proxy port of the requested port mapping
returns proxy port of the requested port mapping
def read_proxy_port(self, port_mappings_str, port_mapping_name, port_mapping_protocol):
        service_proxy_port = None
        if port_mappings_str is not None:
            port_mappings_array = port_mappings_str.split(";")
            if port_mappings_array:
                for port_mapping in port_mappings_array:
                    name_value_array = port_mapping.split("|")
                    name = name_value_array[0].split(":")[1]
                    protocol = name_value_array[1].split(":")[1]
                    proxy_port = name_value_array[3].split(":")[1]
                    if proxy_port == '0':
                        proxy_port = name_value_array[2].split(":")[1]
                    if name == port_mapping_name and protocol == port_mapping_protocol:
                        service_proxy_port = proxy_port
        return service_proxy_port
def read_proxy_port ( self , port_mappings_str , port_mapping_name , port_mapping_protocol ) : service_proxy_port = None if port_mappings_str is not None : port_mappings_array = port_mappings_str . split ( ";" ) if port_mappings_array : for port_mapping in port_mappings_array : name_value_array = port_mapping . split ( "|" ) name = name_value_array [ 0 ] . split ( ":" ) [ 1 ] protocol = name_value_array [ 1 ] . split ( ":" ) [ 1 ] proxy_port = name_value_array [ 3 ] . split ( ":" ) [ 1 ] if proxy_port == '0' : proxy_port = name_value_array [ 2 ] . split ( ":" ) [ 1 ] if name == port_mapping_name and protocol == port_mapping_protocol : service_proxy_port = proxy_port return service_proxy_port
returns proxy port of the requested port mapping
returns proxy port of the requested port mapping
"""
        returns proxy port of the requested port mapping
        :return: void
        """ # port mappings format: NAME:mgt-http|PROTOCOL:http|PORT:30001|PROXY_PORT:0|TYPE:NodePort; #                       NAME:mgt-https|PROTOCOL:https|PORT:30002|PROXY_PORT:0|TYPE:NodePort; #                       NAME:pt-http|PROTOCOL:http|PORT:30003|PROXY_PORT:8280|TYPE:ClientIP; #                       NAME:pt-https|PROTOCOL:https|PORT:30004|PROXY_PORT:8243|TYPE:NodePort # If PROXY_PORT is not set, set PORT as the proxy port (ex:Kubernetes),
None
self
port_mappings_str
port_mapping_name
port_mapping_protocol