
from __future__ import print_function, division

import ssl

import warnings

import requests

from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning


def get_transport(disable_verify=False, use_tlsv1=True):
    transport = requests.Session()

    if disable_verify:
        warnings.filterwarnings("ignore", category=InsecureRequestWarning)
        transport.verify = False

    if use_tlsv1:
        transport.mount('https://', SSLTLSV1Adapter())

    return transport


class SSLTLSV1Adapter(HTTPAdapter):
    """"Transport adapter that allows us to use TLSv1 which is required
    for interacting with the A10 load balancer.
    """

    def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):
        self.poolmanager = PoolManager(
            num_pools=connections, maxsize=maxsize, block=block,
            ssl_version=ssl.PROTOCOL_TLSv1, **pool_kwargs)


from __future__ import print_function, division

import ssl

import warnings

import requests

from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning


def get_transport(verify=True, use_tlsv1=True):
    transport = requests.Session()

    if not verify:
        warnings.filterwarnings("ignore", category=InsecureRequestWarning)
        transport.verify = False

    if use_tlsv1:
        transport.mount('https://', SSLTLSV1Adapter())

    return transport


class SSLTLSV1Adapter(HTTPAdapter):
    """"Transport adapter that allows us to use TLSv1 which is required
    for interacting with the A10 load balancer.
    """

    def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):
        self.poolmanager = PoolManager(
            num_pools=connections, maxsize=maxsize, block=block,
            ssl_version=ssl.PROTOCOL_TLSv1, **pool_kwargs)

Change the name of the verify/no-verify param
Change the name of the verify/no-verify param

  
  from __future__ import print_function, division
  
  import ssl
  
  import warnings
  
  import requests
  
  from requests.adapters import HTTPAdapter
  from requests.packages.urllib3.poolmanager import PoolManager
  from requests.packages.urllib3.exceptions import InsecureRequestWarning
  
  
- def get_transport(disable_verify=False, use_tlsv1=True):
+ def get_transport(verify=True, use_tlsv1=True):
      transport = requests.Session()
  
-     if disable_verify:
+     if not verify:
          warnings.filterwarnings("ignore", category=InsecureRequestWarning)
          transport.verify = False
  
      if use_tlsv1:
          transport.mount('https://', SSLTLSV1Adapter())
  
      return transport
  
  
  class SSLTLSV1Adapter(HTTPAdapter):
      """"Transport adapter that allows us to use TLSv1 which is required
      for interacting with the A10 load balancer.
      """
  
      def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):
          self.poolmanager = PoolManager(
              num_pools=connections, maxsize=maxsize, block=block,
              ssl_version=ssl.PROTOCOL_TLSv1, **pool_kwargs)
  
Change the name of the verify/no-verify param
## Code Before:

from __future__ import print_function, division

import ssl

import warnings

import requests

from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning


def get_transport(disable_verify=False, use_tlsv1=True):
    transport = requests.Session()

    if disable_verify:
        warnings.filterwarnings("ignore", category=InsecureRequestWarning)
        transport.verify = False

    if use_tlsv1:
        transport.mount('https://', SSLTLSV1Adapter())

    return transport


class SSLTLSV1Adapter(HTTPAdapter):
    """"Transport adapter that allows us to use TLSv1 which is required
    for interacting with the A10 load balancer.
    """

    def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):
        self.poolmanager = PoolManager(
            num_pools=connections, maxsize=maxsize, block=block,
            ssl_version=ssl.PROTOCOL_TLSv1, **pool_kwargs)

## Instruction:
Change the name of the verify/no-verify param
## Code After:

from __future__ import print_function, division

import ssl

import warnings

import requests

from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.exceptions import InsecureRequestWarning


def get_transport(verify=True, use_tlsv1=True):
    transport = requests.Session()

    if not verify:
        warnings.filterwarnings("ignore", category=InsecureRequestWarning)
        transport.verify = False

    if use_tlsv1:
        transport.mount('https://', SSLTLSV1Adapter())

    return transport


class SSLTLSV1Adapter(HTTPAdapter):
    """"Transport adapter that allows us to use TLSv1 which is required
    for interacting with the A10 load balancer.
    """

    def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):
        self.poolmanager = PoolManager(
            num_pools=connections, maxsize=maxsize, block=block,
            ssl_version=ssl.PROTOCOL_TLSv1, **pool_kwargs)
