Skip to content

Having troubles after connecting. stdClass::$tenant undefined. #37

@tjbenator

Description

@tjbenator

Having some troubles doing anything after creating the initial connection.

error_reporting(E_ALL);
$TENANT_NAME="admin";
$USERNAME="admin";
$PASSWORD="password";

include('openstack.inc');

$endpoint = 'http://172.25.4.10:5000/v2.0';
setDebug('on');

$credentials = array(
        'username' => $USERNAME,
        'password' => $PASSWORD,
        'tenantName' => $TENANT_NAME
);


$conn = new OpenCloud\OpenStack($endpoint, $credentials);

print_r($conn->ServiceCatalog());
?>

Specifically it is saying that "$tenant" isn't defined. I have read over Issue #9 a number of times, but can't seem to get past it.

Debug:(OpenCloud\OpenStack)Resource [http://172.25.4.10:5000/v2.0/tokens] method [POST] body [{
  "auth": {
    "passwordCredentials": {
      "username":"admin",
      "password":"password"
    }
  }
}]
Debug:(OpenCloud\OpenStack)Headers: [Array
(
    [Content-Type] => application/json
)
]
Debug:(OpenCloud\OpenStack)HTTP STATUS [200]
PHP Notice:  Undefined property: stdClass::$tenant in /opt/php-opencloud/lib/openstack.inc on line 304
PHP Notice:  Trying to get property of non-object in /opt/php-opencloud/lib/openstack.inc on line 304
stdClass Object
(
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions