
from tempest import clients
from tempest.common import rest_client
from tempest import config
import testtools

CONF = config.CONF


class SolumClient(rest_client.RestClient):

    def __init__(self, auth_provider):
        super(SolumClient, self).__init__(auth_provider)
        self.service = 'application_deployment'
        self.endpoint_url = 'publicURL'


class TestCase(testtools.TestCase):
    def setUp(self):
        super(TestCase, self).setUp()
        username = CONF.identity.username
        password = CONF.identity.password
        tenant_name = CONF.identity.tenant_name
        mgr = clients.Manager(username, password, tenant_name)
        auth_provider = mgr.get_auth_provider()
        self.client = SolumClient(auth_provider)


from tempest import clients
from tempest.common import rest_client
from tempest import config
import testtools

CONF = config.CONF


class SolumClient(rest_client.RestClient):

    def __init__(self, auth_provider):
        super(SolumClient, self).__init__(auth_provider)
        self.service = 'application_deployment'
        self.endpoint_url = 'publicURL'


class TestCase(testtools.TestCase):
    def setUp(self):
        super(TestCase, self).setUp()
        username = CONF.identity.username
        password = CONF.identity.password
        tenant_name = CONF.identity.tenant_name
        mgr = clients.Manager(username, password, tenant_name)
        auth_provider = mgr.get_auth_provider(mgr.get_default_credentials())
        self.client = SolumClient(auth_provider)

Fix functionaltests (imported tempest code has changed)
Fix functionaltests (imported tempest code has changed)

get_auth_provider now takes an argument.

Change-Id: I4a80ef3fdf2914854268459cf1080a46922e93d5

  
  from tempest import clients
  from tempest.common import rest_client
  from tempest import config
  import testtools
  
  CONF = config.CONF
  
  
  class SolumClient(rest_client.RestClient):
  
      def __init__(self, auth_provider):
          super(SolumClient, self).__init__(auth_provider)
          self.service = 'application_deployment'
          self.endpoint_url = 'publicURL'
  
  
  class TestCase(testtools.TestCase):
      def setUp(self):
          super(TestCase, self).setUp()
          username = CONF.identity.username
          password = CONF.identity.password
          tenant_name = CONF.identity.tenant_name
          mgr = clients.Manager(username, password, tenant_name)
-         auth_provider = mgr.get_auth_provider()
+         auth_provider = mgr.get_auth_provider(mgr.get_default_credentials())
          self.client = SolumClient(auth_provider)
  
Fix functionaltests (imported tempest code has changed)
## Code Before:

from tempest import clients
from tempest.common import rest_client
from tempest import config
import testtools

CONF = config.CONF


class SolumClient(rest_client.RestClient):

    def __init__(self, auth_provider):
        super(SolumClient, self).__init__(auth_provider)
        self.service = 'application_deployment'
        self.endpoint_url = 'publicURL'


class TestCase(testtools.TestCase):
    def setUp(self):
        super(TestCase, self).setUp()
        username = CONF.identity.username
        password = CONF.identity.password
        tenant_name = CONF.identity.tenant_name
        mgr = clients.Manager(username, password, tenant_name)
        auth_provider = mgr.get_auth_provider()
        self.client = SolumClient(auth_provider)

## Instruction:
Fix functionaltests (imported tempest code has changed)
## Code After:

from tempest import clients
from tempest.common import rest_client
from tempest import config
import testtools

CONF = config.CONF


class SolumClient(rest_client.RestClient):

    def __init__(self, auth_provider):
        super(SolumClient, self).__init__(auth_provider)
        self.service = 'application_deployment'
        self.endpoint_url = 'publicURL'


class TestCase(testtools.TestCase):
    def setUp(self):
        super(TestCase, self).setUp()
        username = CONF.identity.username
        password = CONF.identity.password
        tenant_name = CONF.identity.tenant_name
        mgr = clients.Manager(username, password, tenant_name)
        auth_provider = mgr.get_auth_provider(mgr.get_default_credentials())
        self.client = SolumClient(auth_provider)
