-
Notifications
You must be signed in to change notification settings - Fork 358
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
Add EAP and Wildfly to allowed types for MW topology #2724
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
let(:long_id_5) { "Local~/deployment=hawkular-command-gateway-war.war" } | ||
let(:long_id_6) { "Local~/subsystem=datasources/data-source=ExampleDS" } | ||
let(:long_id_7) { "Local~/subsystem=messaging-activemq/server=default/jms-topic=HawkularMetricData" } | ||
let(:long_id_8) { "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;fabf8d822986/r;Local%20DMR~~" } | ||
let(:long_id_9) { "/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;unused-4-252.brq.redhat.com/r;Local%20DMR~~" } | ||
|
||
describe "#build_topology" do | ||
subject { middleware_topology_service.build_topology } | ||
|
@@ -23,6 +25,27 @@ | |
:properties => { 'Calculated Server State' => 'running' }) | ||
end | ||
|
||
let!(:mw_server_wildfly) do | ||
FactoryGirl.create(:hawkular_middleware_server_wildfly, | ||
:name => 'Local DMR', | ||
:feed => 'fabf8d822986', | ||
:ems_ref => long_id_0, | ||
:nativeid => 'Local DMR~~', | ||
:ext_management_system => ems_hawkular, | ||
:properties => { 'Calculated Server State' => 'running' }) | ||
end | ||
|
||
let!(:mw_server_eap) do | ||
FactoryGirl.create(:hawkular_middleware_server_eap, | ||
:name => 'Local DMR', | ||
:feed => 'unused-4-252.brq.redhat.com', | ||
:ems_ref => long_id_0, | ||
:nativeid => 'Local DMR~~', | ||
:ext_management_system => ems_hawkular, | ||
:product => 'EAP', | ||
:properties => { 'Calculated Server State' => 'running', 'product' => 'EAP' }) | ||
end | ||
|
||
before do | ||
allow(middleware_topology_service).to receive(:retrieve_providers).and_return([ems_hawkular]) | ||
end | ||
|
@@ -76,6 +99,28 @@ | |
:key => "MiddlewareServer" + mw_server.compressed_id.to_s} | ||
) | ||
|
||
expect(subject[:items]).to include( | ||
"MiddlewareServerEap" + mw_server_eap.compressed_id.to_s => {:name => mw_server_eap.name, | ||
:status => "Running", | ||
:kind => "MiddlewareServerEap", | ||
:display_kind => "MiddlewareServerEap", | ||
:miq_id => mw_server_eap.id, | ||
:icon => match(/vendor-jboss-eap/), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this the same as above? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you are correct! |
||
:model => mw_server_eap.class.name, | ||
:key => "MiddlewareServerEap" + mw_server_eap.compressed_id.to_s} | ||
) | ||
|
||
expect(subject[:items]).to include( | ||
"MiddlewareServerWildfly" + mw_server_wildfly.compressed_id.to_s => {:name => mw_server_wildfly.name, | ||
:status => "Running", | ||
:kind => "MiddlewareServerWildfly", | ||
:display_kind => "MiddlewareServerWildfly", | ||
:miq_id => mw_server_wildfly.id, | ||
:icon => match(/vendor-wildfly/), | ||
:model => mw_server_wildfly.class.name, | ||
:key => "MiddlewareServerWildfly" + mw_server_wildfly.compressed_id.to_s} | ||
) | ||
|
||
expect(subject[:items]).to include( | ||
"MiddlewareDeployment" + mw_deployment1.compressed_id.to_s => {:name => mw_deployment1.name, | ||
:status => "Enabled", | ||
|
@@ -116,18 +161,36 @@ | |
:key => "MiddlewareMessaging" + mw_messaging.compressed_id.to_s} | ||
) | ||
|
||
expect(subject[:relations].size).to eq(5) | ||
expect(subject[:relations].size).to eq(7) | ||
expect(subject[:relations]).to include( | ||
{:source => "MiddlewareManager" + ems_hawkular.compressed_id.to_s, | ||
:target => "MiddlewareServer" + mw_server.compressed_id.to_s}, | ||
{:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
:target => "MiddlewareDeployment" + mw_deployment1.compressed_id.to_s}, | ||
{:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
:target => "MiddlewareDeployment" + mw_deployment2.compressed_id.to_s}, | ||
{:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
:target => "MiddlewareDatasource" + mw_datasource.compressed_id.to_s}, | ||
{:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
:target => "MiddlewareMessaging" + mw_messaging.compressed_id.to_s} | ||
{ | ||
:source => "MiddlewareManager" + ems_hawkular.compressed_id.to_s, | ||
:target => "MiddlewareServer" + mw_server.compressed_id.to_s | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is not relevant atm, we'll get only eap/wildfly types |
||
}, | ||
{ | ||
:source => "MiddlewareManager" + ems_hawkular.compressed_id.to_s, | ||
:target => "MiddlewareServerEap" + mw_server_eap.compressed_id.to_s | ||
}, | ||
{ | ||
:source => "MiddlewareManager" + ems_hawkular.compressed_id.to_s, | ||
:target => "MiddlewareServerWildfly" + mw_server_wildfly.compressed_id.to_s | ||
}, | ||
{ | ||
:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. like above, I think all MiddlewareServer is not going to appear anymore, unless I got it wrong |
||
:target => "MiddlewareDeployment" + mw_deployment1.compressed_id.to_s | ||
}, | ||
{ | ||
:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
:target => "MiddlewareDeployment" + mw_deployment2.compressed_id.to_s | ||
}, | ||
{ | ||
:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
:target => "MiddlewareDatasource" + mw_datasource.compressed_id.to_s | ||
}, | ||
{ | ||
:source => "MiddlewareServer" + mw_server.compressed_id.to_s, | ||
:target => "MiddlewareMessaging" + mw_messaging.compressed_id.to_s | ||
} | ||
) | ||
end | ||
|
||
|
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.
is this link still relevant in the current architecture with eap/wildfly? I mean will we get it on real env? Won't we get only wildfly/eap objects in the json, no?
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.
Well I am not against removing these, however we still use MiddlewareServer for Hawkular server. So Whenever I spin hawkular standalone the server inside it will be of type MiddlewareServer. I tested this with hawkinit and it was still present.
However if you'd were to run hawkular provider on wildfly/eap solely by installing some packages and such (kinda hard to do) it will be of type wildfly/eap.
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.
ok, as long as it appears then it should be present. the point here is to make sure this reflects a real env.