Index: trunk/extensions/OpenStackManager/OpenStackNovaHost.php |
— | — | @@ -158,14 +158,14 @@ |
159 | 159 | |
160 | 160 | $domainname = $domain->getFullyQualifiedDomainName(); |
161 | 161 | |
162 | | - $host = new OpenStackNovaHost( $hostname ); |
| 162 | + $host = new OpenStackNovaHost( $hostname, $domain ); |
163 | 163 | if ( $host ) { |
164 | 164 | return false; |
165 | 165 | } |
166 | 166 | $host = OpenStackNovaHost::getLDAPArray( $hostname, $ip, $domainname ); |
167 | 167 | $dn = 'dc=' . $hostname . ',dc=' . $domain->getDomainName() . ',' . $wgOpenStackManagerLDAPDNSDomainBaseDN; |
168 | 168 | |
169 | | - $success = @ldap_add( $wgAuth->ldapconn, $dn, $host ); |
| 169 | + $success = @ldap_add( $wgAuth->ldapconn, $dn, $hostname ); |
170 | 170 | if ( $success ) { |
171 | 171 | $domain->updateSOA(); |
172 | 172 | $wgAuth->printDebug( "Successfully added domain $domainname", NONSENSITIVE ); |
Index: trunk/extensions/OpenStackManager/OpenStackNovaDomain.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | $hostsLDAP = ldap_get_entries( $wgAuth->ldapconn, $result ); |
51 | 51 | array_shift( $hostsLDAP ); |
52 | 52 | foreach ( $hostsLDAP as $hostLDAP ) { |
53 | | - $hosts[] = new OpenStackNovaHost( $hostLDAP[0]['dc'] ); |
| 53 | + $hosts[] = new OpenStackNovaHost( $hostLDAP[0]['dc'] ); // FIXME: Missing constructor parameter |
54 | 54 | } |
55 | 55 | |
56 | 56 | return $hosts; |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | function updateSOA() { |
60 | 60 | global $wgAuth; |
61 | 61 | |
62 | | - $domain['soarecord'] = $OpenStackNovaDomain::generateSOA(); |
| 62 | + $domain['soarecord'] = OpenStackNovaDomain::generateSOA(); |
63 | 63 | $success = @ldap_modify( $wgAuth->ldapconn, $this->domainDN, $domain ); |
64 | 64 | if ( $success ) { |
65 | 65 | $wgAuth->printDebug( "Successfully modified soarecord for " . $this->domainDN, NONSENSITIVE ); |