@classmethod
    def create_session(
            cls, keystone_url=None, instance_uuid=None, membership_id=None, check_tenant=True, membership=None,
            **kwargs):

        backend = cls()
        if keystone_url:
            return backend.create_admin_session(keystone_url)

        elif instance_uuid or membership or membership_id:
            if instance_uuid:
                instance = models.Instance.objects.get(uuid=instance_uuid)
                membership = instance.cloud_project_membership
            if membership_id:
                membership = models.CloudProjectMembership.objects.get(id=membership_id)
            credentials = {
                'auth_url': membership.cloud.auth_url,
                'username': membership.username,
                'password': membership.password,
            }
            if check_tenant:
                if not membership.tenant_id:
                    raise CloudBackendError("Can't create tenant session, please provide tenant ID")
                credentials['tenant_id'] = membership.tenant_id
            return backend.create_tenant_session(credentials)

        raise CloudBackendError('Missing OpenStack credentials')
Add the value to the list. Values already in the list will not be added.
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/backend.py/OpenStackBackend.create_session--crossover with--dataset/ETHPy150Open pinterest/kingpin/kingpin/manageddata/managed_datastructures.py/ManagedList.add