'Establish the rest session.
:returns: requests.session() -- session, the rest session'

def _establish_rest_session(self):

    session = requests.session()
    session.headers = {'content-type': 'application/json', 'accept': 'application/json', 'Application-Type': 'openstack'}
    session.auth = requests.auth.HTTPBasicAuth(self.user, self.passwd)
    if (self.verify is not None):
        session.verify = self.verify
    if self.cert:
        session.cert = self.cert
    return session
