-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip]Upgrade Ovirt Cluster through Ansibel #304
Conversation
engine_user: connect_options[:username], | ||
engine_password: connect_options[:password], | ||
cluster_name: name, | ||
hostname: "localhost" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localhost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it runs on local host. the target is defined in the engine_url.
engine_url: url, | ||
engine_user: connect_options[:username], | ||
engine_password: connect_options[:password], | ||
cluster_name: name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see name
being defined. Is it defined in super class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, in EmsCluster
@borod108 typo in header - Ansibel |
00431af
to
81a6b20
Compare
@pkliczewski @masayag will you please review and merge? |
81a6b20
to
78284d6
Compare
@borod108 Please make sure that Travis is happy. |
5b10155
to
5f684e9
Compare
@ems = FactoryGirl.create(:ems_redhat_with_authentication) | ||
@cluster = FactoryGirl.create(:ems_cluster_redhat, :ems_id => @ems.id) | ||
my_server = double("my_server", :guid => "guid1") | ||
allow(MiqServer).to receive(:my_server).and_return(my_server) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What receive(:my_server)
stands for ? it doesn't seems like a method name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a method name, it is used here to put a task into MiqQueue: https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/ansible_runner_workflow.rb#L72
Add method to upgrade cluster using ovirt-ansible-cluster-upgrade role.
5f684e9
to
9df4a8a
Compare
@borod108 there's a typo in header |
e21f22b
to
e9ea47c
Compare
Checked commits borod108/manageiq-providers-ovirt@9df4a8a~...e9ea47c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@agrare @Ladas so I manged to make it work, without moving the ems_cluster code to the core repo. So everything seems to work fine, but because we do not really have sit for ems cluster I would like you to review and tell me if it is ok to leave it like this. (The solution was setting the class_model to ::EmsCluster) |
@borod108 hm, and does it store the right :type into EmsCluster record? I'd say it will not store the ManageIQ::Providers::Redhat::InfraManager::EmsCluster? |
@@ -0,0 +1,29 @@ | |||
class ManageIQ::Providers::Redhat::InfraManager::EmsCluster < ::EmsCluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@borod108 lets try to define this as
module ManageIQ
module Providers
module Redhat
class InfraManager
class EmsCluster < ::EmsCluster
end
end
end
end
end
@@ -24,7 +24,9 @@ def initialize_infra_inventory_collections | |||
# --- IC groups definitions --- | |||
|
|||
def add_clusters_group | |||
add_collection(infra, :ems_clusters) | |||
add_collection(infra, :ems_clusters) do |builder| | |||
builder.add_properties(:model_class => ::EmsCluster) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@borod108 and with the nested definition ^, lets try
:model_class => ManageIQ::Providers::Redhat::InfraManager::EmsCluster
and then verify it stores the right :type into the DB
Have to close this PR and move it to core, since EmsCluster does not have sti. |
Add method to upgrade cluster using ovirt-ansible-cluster-upgrade role.
Depends on: ManageIQ/manageiq#18108