You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The create() method in \OpenCloud\Compute\Resource\ServerMetadata calls getMetadataJson(). There the metadata should add to a new object which will be json encoded. But in this method something is wrong. Only the medadata value is stored and not the key-value-pair. In my example the metadata-object looks like: "some_value" => "". This brings up two problems:
You are not able to get the value from a given key
After adding new metadata you get an exception in line 184Cannnot access empty property.
I think the easiest way is to replace the foreach in line 183 with $object->metadata = $this->keylist();
After this change the metadata are stored correctly.
The text was updated successfully, but these errors were encountered:
@mc388 thanks for reporting this. I've pushed a fix to working. Can you point your Composer dependency to dev-working and let me know if it works for you?
I try to add some metadata to a server with the following code:
The
create()
method in\OpenCloud\Compute\Resource\ServerMetadata
callsgetMetadataJson()
. There the metadata should add to a new object which will be json encoded. But in this method something is wrong. Only the medadata value is stored and not the key-value-pair. In my example the metadata-object looks like:"some_value" => ""
. This brings up two problems:Cannnot access empty property
.I think the easiest way is to replace the foreach in line 183 with
$object->metadata = $this->keylist();
After this change the metadata are stored correctly.
The text was updated successfully, but these errors were encountered: