Skip to content

Identity v3 bugs - not yet fixed #287

Open

Description

@TheDigitalOrchard

Hi,
after investigating, I solved the problem with the following code:

diff -ru vendor/php-opencloud/openstack/src/Identity/v3/Models/Endpoint.php ../openstack/vendor/php-opencloud/openstack/src/Identity/v3/Models/Endpoint.php
--- vendor/php-opencloud/openstack/src/Identity/v3/Models/Endpoint.php	2017-07-14 04:39:28.000000000 -0300
+++ ../openstack/vendor/php-opencloud/openstack/src/Identity/v3/Models/Endpoint.php	2017-09-18 16:37:45.303314819 -0300
@@ -77,6 +77,8 @@
 
     public function regionMatches(string $value): bool
     {
+        if($this->region == '*')
+            return true;
         return $this->region && $this->region == $value;
     }
 
diff -ru vendor/php-opencloud/openstack/src/Identity/v3/Models/Service.php ../openstack/vendor/php-opencloud/openstack/src/Identity/v3/Models/Service.php
--- vendor/php-opencloud/openstack/src/Identity/v3/Models/Service.php	2017-07-14 04:39:28.000000000 -0300
+++ ../openstack/vendor/php-opencloud/openstack/src/Identity/v3/Models/Service.php	2017-09-18 16:31:53.184373496 -0300
@@ -79,7 +79,7 @@
 
     private function typeMatches(string $value): bool
     {
-        return $this->type && $this->type = $value;
+        return $this->type && $this->type == $value;
     }
 
     /**
@@ -94,7 +94,7 @@
      */
     public function getUrl(string $name, string $type, string $region, string $interface)
     {
-        if (!$this->nameMatches($name) || !$this->typeMatches($type)) {
+        if (!$this->nameMatches($name) && !$this->typeMatches($type)) {
             return false;
         }

Originally posted by @thiagodamas in #91 (comment)

Activity

  1. changed the title [-]Identity v2 bugs - not yet fixed[/-] [+]Identity v3 bugs - not yet fixed[/+] on Jul 27, 2019
  2. TheDigitalOrchard commented on Jul 27, 2019

    @TheDigitalOrchard
    ContributorAuthor

    PR #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions