New Compute Resource Provider (OpenStack V3 Identity API)

I have an Openstack setup that uses V3 Identity API. From what I can tell,
Foreman doesn't support V3 (FOG does though).

So I did some hacking on the original provider and was able to get it to
work somewhat. Then I circled back and decided to make a new compute
resource provider such that I could have V2 and V3.

First thing I did was update app/models/compute_resource.rb and added a new
entry to supported_providers:

class_attribute :supported_providers

self.supported_providers = {

'Libvirt'     => 'Foreman::Model::Libvirt', 

'Ovirt'       => 'Foreman::Model::Ovirt', 

'EC2'         => 'Foreman::Model::EC2', 

'Vmware'      => 'Foreman::Model::Vmware', 

'Openstack'   => 'Foreman::Model::Openstack', 

'OpenstackV3' => 'Foreman::Model::OpenstackV3', 

'Rackspace'   => 'Foreman::Model::Rackspace', 

'GCE'         => 'Foreman::Model::GCE', 

}

I then created the new provider class
(app/models/compute_resources/foreman/model/openstackv3.rb). If I load
Foreman and go to the About page I see the provider listed under available
providers but it says "Not Installed".

Not sure what I do to configure it as installed. Any help would be
appreciated. Thanks

Assuming you're on develop, then this is driven by the compute provider
model's .available? method which checks for a registered Fog provider.
Ensure this expression returns true.

··· On 29/06/16 19:14, Matthew Ceroni wrote: > I have an Openstack setup that uses V3 Identity API. From what I can > tell, Foreman doesn't support V3 (FOG does though). > > So I did some hacking on the original provider and was able to get it to > work somewhat. Then I circled back and decided to make a new compute > resource provider such that I could have V2 and V3. > > First thing I did was update app/models/compute_resource.rb and added a > new entry to supported_providers: > > > > class_attribute :supported_providers > > self.supported_providers ={ > > 'Libvirt' =>'Foreman::Model::Libvirt', > > 'Ovirt' =>'Foreman::Model::Ovirt', > > 'EC2' =>'Foreman::Model::EC2', > > 'Vmware' =>'Foreman::Model::Vmware', > > 'Openstack' =>'Foreman::Model::Openstack', > > 'OpenstackV3'=>'Foreman::Model::OpenstackV3', > > 'Rackspace' =>'Foreman::Model::Rackspace', > > 'GCE' =>'Foreman::Model::GCE', > > } > > > > > I then created the new provider class > (app/models/compute_resources/foreman/model/openstackv3.rb). If I load > Foreman and go to the About page I see the provider listed under > available providers but it says "Not Installed".


Dominic Cleal
dominic@cleal.org

Yep, figured that out yesterday.

Thanks for the reply

··· On Thursday, June 30, 2016 at 12:06:05 AM UTC-7, Dominic Cleal wrote: > > On 29/06/16 19:14, Matthew Ceroni wrote: > > I have an Openstack setup that uses V3 Identity API. From what I can > > tell, Foreman doesn't support V3 (FOG does though). > > > > So I did some hacking on the original provider and was able to get it to > > work somewhat. Then I circled back and decided to make a new compute > > resource provider such that I could have V2 and V3. > > > > First thing I did was update app/models/compute_resource.rb and added a > > new entry to supported_providers: > > > > > > > class_attribute :supported_providers > > > > self.supported_providers ={ > > > > 'Libvirt' =>'Foreman::Model::Libvirt', > > > > 'Ovirt' =>'Foreman::Model::Ovirt', > > > > 'EC2' =>'Foreman::Model::EC2', > > > > 'Vmware' =>'Foreman::Model::Vmware', > > > > 'Openstack' =>'Foreman::Model::Openstack', > > > > 'OpenstackV3'=>'Foreman::Model::OpenstackV3', > > > > 'Rackspace' =>'Foreman::Model::Rackspace', > > > > 'GCE' =>'Foreman::Model::GCE', > > > > } > > > > > > > > > I then created the new provider class > > (app/models/compute_resources/foreman/model/openstackv3.rb). If I load > > Foreman and go to the About page I see the provider listed under > > available providers but it says "Not Installed". > > Assuming you're on develop, then this is driven by the compute provider > model's .available? method which checks for a registered Fog provider. > Ensure this expression returns true. > > -- > Dominic Cleal > dom...@cleal.org >