foreman_ovirt 0.3.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/{LICENSE.txt → LICENSE} +0 -2
- data/README.md +140 -0
- data/Rakefile +37 -43
- data/app/assets/javascripts/foreman_ovirt/display.js +10 -0
- data/app/assets/javascripts/foreman_ovirt/host_edit.js +61 -0
- data/app/assets/javascripts/foreman_ovirt/nic_info.js +3 -0
- data/app/assets/javascripts/foreman_ovirt/ovirt.js +261 -0
- data/app/controllers/concerns/foreman_ovirt/compute_resources_vms_controller.rb +29 -0
- data/app/controllers/concerns/foreman_ovirt/parameters_extension.rb +35 -0
- data/app/controllers/foreman_ovirt/concerns/compute_resources_controller_extensions.rb +60 -0
- data/app/helpers/ovirt_compute_resource_helper.rb +26 -0
- data/app/models/concerns/fog_extensions/ovirt/server.rb +42 -0
- data/app/models/concerns/fog_extensions/ovirt/template.rb +14 -0
- data/app/models/concerns/fog_extensions/ovirt/volume.rb +11 -0
- data/app/models/foreman_ovirt/ovirt.rb +752 -0
- data/app/views/api/v2/compute_resources/ovirt.json.rabl +1 -0
- data/app/views/compute_resources/form/_ovirt.html.erb +14 -0
- data/app/views/compute_resources/show/_ovirt.html.erb +16 -0
- data/app/views/compute_resources_vms/form/ovirt/_base.html.erb +83 -0
- data/app/views/compute_resources_vms/form/ovirt/_network.html.erb +32 -0
- data/app/views/compute_resources_vms/form/ovirt/_volume.html.erb +16 -0
- data/app/views/compute_resources_vms/index/_ovirt.html.erb +12 -0
- data/app/views/compute_resources_vms/index/_ovirt_json.erb +6 -0
- data/app/views/compute_resources_vms/show/_ovirt.html.erb +55 -0
- data/app/views/images/form/_ovirt.html.erb +4 -0
- data/config/routes.rb +8 -13
- data/db/migrate/20250810212811_update_legacy_ovirt_compute_resource_type.rb +21 -0
- data/lib/foreman_ovirt/engine.rb +70 -0
- data/lib/foreman_ovirt/version.rb +3 -0
- data/lib/foreman_ovirt.rb +2 -1
- data/lib/tasks/foreman_ovirt_tasks.rake +30 -0
- data/locale/Makefile +73 -0
- data/locale/en/foreman_ovirt.po +19 -0
- data/locale/foreman_ovirt.pot +19 -0
- data/locale/gemspec.rb +2 -0
- data/package.json +39 -0
- data/test/factories/foreman_ovirt_factories.rb +5 -0
- data/test/test_plugin_helper.rb +6 -0
- data/test/unit/foreman_ovirt_test.rb +11 -0
- data/webpack/components/extensions/HostDetails/DetailsTabCards/OvirtCard.js +132 -0
- data/webpack/components/ovirt.js +20 -0
- data/webpack/global_index.js +14 -0
- data/webpack/global_test_setup.js +11 -0
- data/webpack/index.js +1 -0
- data/webpack/test_setup.js +17 -0
- metadata +154 -128
- data/.document +0 -5
- data/Gemfile +0 -14
- data/Gemfile.lock +0 -33
- data/README.rdoc +0 -20
- data/VERSION +0 -1
- data/app/controllers/foreman_ovirt/auth_source_ovirts_controller.rb +0 -57
- data/app/controllers/foreman_ovirt/dashboard_controller.rb +0 -10
- data/app/controllers/foreman_ovirt/hosts_controller.rb +0 -17
- data/app/models/foreman_ovirt/auth_source_ovirt.rb +0 -78
- data/app/models/foreman_ovirt/user_extensions.rb +0 -26
- data/app/views/foreman_ovirt/auth_source_ovirts/_form.html.erb +0 -17
- data/app/views/foreman_ovirt/auth_source_ovirts/edit.html.erb +0 -3
- data/app/views/foreman_ovirt/auth_source_ovirts/index.html.erb +0 -22
- data/app/views/foreman_ovirt/auth_source_ovirts/new.html.erb +0 -3
- data/app/views/foreman_ovirt/auth_source_ovirts/welcome.html.erb +0 -8
- data/app/views/foreman_ovirt/hosts/_overview.html.erb +0 -27
- data/app/views/foreman_ovirt/hosts/show.html.erb +0 -48
- data/app/views/foreman_ovirt/hosts/show_graphs.html.erb +0 -13
- data/app/views/layouts/application_ovirt.html.erb +0 -36
- data/config/initializers/ovirt_setup.rb +0 -30
- data/foreman_ovirt.gemspec +0 -74
- data/lib/engine.rb +0 -9
@@ -0,0 +1,132 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
4
|
+
import { foremanUrl } from 'foremanReact/common/helpers';
|
5
|
+
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
|
6
|
+
import ErrorBoundary from 'foremanReact/components/common/ErrorBoundary';
|
7
|
+
import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate';
|
8
|
+
import {
|
9
|
+
Card,
|
10
|
+
CardBody,
|
11
|
+
CardHeader,
|
12
|
+
CardTitle,
|
13
|
+
DescriptionList,
|
14
|
+
DescriptionListGroup,
|
15
|
+
DescriptionListTerm,
|
16
|
+
DescriptionListDescription,
|
17
|
+
} from '@patternfly/react-core';
|
18
|
+
import { Spinner } from '@patternfly/react-core';
|
19
|
+
import { number_to_human_size as NumberToHumanSize } from 'number_helpers';
|
20
|
+
|
21
|
+
const OvirtCard = ({ hostDetails }) => {
|
22
|
+
const {
|
23
|
+
id: hostId,
|
24
|
+
compute_resource_id: computeResourceId,
|
25
|
+
compute_resource_name: computeResourceName,
|
26
|
+
compute_resource_provider: provider,
|
27
|
+
} = hostDetails;
|
28
|
+
const virtUrl = foremanUrl(`/api/hosts/${hostId}/vm_compute_attributes`);
|
29
|
+
const { response: vm, status = {} } = useAPI('get', virtUrl) || {};
|
30
|
+
|
31
|
+
if (status.isLoading) {
|
32
|
+
return (
|
33
|
+
<CardTemplate header={__('oVirt')}>
|
34
|
+
<Spinner size="md" />
|
35
|
+
</CardTemplate>
|
36
|
+
);
|
37
|
+
}
|
38
|
+
|
39
|
+
if (!vm || Object.keys(vm).length === 0) {
|
40
|
+
return null;
|
41
|
+
}
|
42
|
+
|
43
|
+
const errorFallback = () => (
|
44
|
+
<EmptyState
|
45
|
+
icon={<div />}
|
46
|
+
header={__('Something went wrong')}
|
47
|
+
description={__('There was an error loading this content.')}
|
48
|
+
/>
|
49
|
+
);
|
50
|
+
|
51
|
+
return (
|
52
|
+
<CardTemplate header={__('oVirt')} masonryLayout>
|
53
|
+
<ErrorBoundary fallback={errorFallback}>
|
54
|
+
<DescriptionList isCompact isHorizontal>
|
55
|
+
<DescriptionListGroup>
|
56
|
+
<DescriptionListTerm>{__('Name')}</DescriptionListTerm>
|
57
|
+
<DescriptionListDescription>{vm.name}</DescriptionListDescription>
|
58
|
+
</DescriptionListGroup>
|
59
|
+
<DescriptionListGroup>
|
60
|
+
<DescriptionListTerm>{__('Cores per Socket')}</DescriptionListTerm>
|
61
|
+
<DescriptionListDescription>{vm.cores}</DescriptionListDescription>
|
62
|
+
</DescriptionListGroup>
|
63
|
+
<DescriptionListGroup>
|
64
|
+
<DescriptionListTerm>{__('Sockets')}</DescriptionListTerm>
|
65
|
+
<DescriptionListDescription>{vm.sockets}</DescriptionListDescription>
|
66
|
+
</DescriptionListGroup>
|
67
|
+
<DescriptionListGroup>
|
68
|
+
<DescriptionListTerm>{__('Memory')}</DescriptionListTerm>
|
69
|
+
<DescriptionListDescription>
|
70
|
+
{NumberToHumanSize(vm.memory, { strip_insignificant_zeros: true })}
|
71
|
+
</DescriptionListDescription>
|
72
|
+
</DescriptionListGroup>
|
73
|
+
{vm.display && (
|
74
|
+
<DescriptionListGroup>
|
75
|
+
<DescriptionListTerm>{__('Display')}</DescriptionListTerm>
|
76
|
+
<DescriptionListDescription>{vm.display.type}</DescriptionListDescription>
|
77
|
+
</DescriptionListGroup>
|
78
|
+
)}
|
79
|
+
{vm.display && vm.display.type === 'vnc' && (
|
80
|
+
<DescriptionListGroup>
|
81
|
+
<DescriptionListTerm>{__('Keyboard')}</DescriptionListTerm>
|
82
|
+
<DescriptionListDescription>
|
83
|
+
{vm.display.keyboard_layout}
|
84
|
+
</DescriptionListDescription>
|
85
|
+
</DescriptionListGroup>
|
86
|
+
)}
|
87
|
+
{vm.interfaces_attributes && Object.keys(vm.interfaces_attributes).length > 0 &&
|
88
|
+
Object.values(vm.interfaces_attributes).map((nic, index) => (
|
89
|
+
<DescriptionListGroup key={`nic-${index}`}>
|
90
|
+
<DescriptionListTerm>{__('NIC name')}</DescriptionListTerm>
|
91
|
+
<DescriptionListDescription>
|
92
|
+
{nic.compute_attributes.name}
|
93
|
+
</DescriptionListDescription>
|
94
|
+
<DescriptionListTerm>{__('Network')}</DescriptionListTerm>
|
95
|
+
<DescriptionListDescription>
|
96
|
+
{nic.compute_attributes.network}
|
97
|
+
</DescriptionListDescription>
|
98
|
+
<DescriptionListTerm>{__('MAC address')}</DescriptionListTerm>
|
99
|
+
<DescriptionListDescription>{nic.mac}</DescriptionListDescription>
|
100
|
+
</DescriptionListGroup>
|
101
|
+
))}
|
102
|
+
{vm.volumes_attributes && Object.keys(vm.volumes_attributes).length > 0 &&
|
103
|
+
Object.values(vm.volumes_attributes).map((vol, index) => (
|
104
|
+
<DescriptionListGroup key={`volume-${index}`}>
|
105
|
+
<DescriptionListTerm>{__('Disk')}</DescriptionListTerm>
|
106
|
+
<DescriptionListDescription>
|
107
|
+
{NumberToHumanSize(vol.size_gb * 1024 ** 3, {
|
108
|
+
strip_insignificant_zeros: true,
|
109
|
+
})}
|
110
|
+
</DescriptionListDescription>
|
111
|
+
</DescriptionListGroup>
|
112
|
+
))}
|
113
|
+
</DescriptionList>
|
114
|
+
</ErrorBoundary>
|
115
|
+
</CardTemplate>
|
116
|
+
);
|
117
|
+
};
|
118
|
+
|
119
|
+
OvirtCard.propTypes = {
|
120
|
+
hostDetails: PropTypes.shape({
|
121
|
+
id: PropTypes.number,
|
122
|
+
compute_resource_id: PropTypes.number,
|
123
|
+
compute_resource_name: PropTypes.string,
|
124
|
+
compute_resource_provider: PropTypes.string,
|
125
|
+
}),
|
126
|
+
};
|
127
|
+
|
128
|
+
OvirtCard.defaultProps = {
|
129
|
+
hostDetails: {},
|
130
|
+
};
|
131
|
+
|
132
|
+
export default OvirtCard;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/* eslint-disable jquery/no-each */
|
2
|
+
/* eslint-disable jquery/no-text */
|
3
|
+
/* eslint-disable jquery/no-data */
|
4
|
+
/* eslint-disable jquery/no-sizzle */
|
5
|
+
/* eslint-disable jquery/no-hide */
|
6
|
+
/* eslint-disable jquery/no-attr */
|
7
|
+
/* eslint-disable jquery/no-ajax */
|
8
|
+
/* eslint-disable jquery/no-trigger */
|
9
|
+
/* eslint-disable jquery/no-val */
|
10
|
+
/* eslint-disable jquery/no-prop */
|
11
|
+
/* eslint-disable func-names */
|
12
|
+
|
13
|
+
import $ from 'jquery';
|
14
|
+
import { testConnection } from 'foremanReact/components/foreman_compute_resource';
|
15
|
+
|
16
|
+
// used by test connection
|
17
|
+
export function datacenterSelected(item) {
|
18
|
+
// eslint-disable-next-line no-undef
|
19
|
+
testConnection($('#test_connection_button'));
|
20
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
import { registerReducer } from 'foremanReact/common/MountingService';
|
4
|
+
import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
|
5
|
+
import { registerRoutes } from 'foremanReact/routes/RoutingService';
|
6
|
+
|
7
|
+
import OvirtCard from './components/extensions/HostDetails/DetailsTabCards/OvirtCard';
|
8
|
+
|
9
|
+
addGlobalFill(
|
10
|
+
'host-tab-details-cards',
|
11
|
+
'oVirt',
|
12
|
+
<OvirtCard key="ovirt_card" />,
|
13
|
+
25
|
14
|
+
);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// runs before each test to make sure console.error output will
|
2
|
+
// fail a test (i.e. default PropType missing). Check the error
|
3
|
+
// output and traceback for actual error.
|
4
|
+
global.console.error = (error, stack) => {
|
5
|
+
/* eslint-disable-next-line no-console */
|
6
|
+
if (stack) console.log(stack); // Prints out original stack trace
|
7
|
+
throw new Error(error);
|
8
|
+
};
|
9
|
+
|
10
|
+
// Increase jest timeout as some tests using multiple http mocks can time out on CI systems.
|
11
|
+
jest.setTimeout(10000);
|
data/webpack/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
import componentRegistry from 'foremanReact/components/componentRegistry';
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import 'core-js/shim';
|
2
|
+
import 'regenerator-runtime/runtime';
|
3
|
+
import MutationObserver from '@sheerun/mutationobserver-shim';
|
4
|
+
|
5
|
+
import { configure } from 'enzyme';
|
6
|
+
import Adapter from 'enzyme-adapter-react-16';
|
7
|
+
|
8
|
+
configure({ adapter: new Adapter() });
|
9
|
+
|
10
|
+
// Mocking translation function
|
11
|
+
global.__ = text => text; // eslint-disable-line
|
12
|
+
|
13
|
+
// Mocking locales to prevent unnecessary fallback messages
|
14
|
+
window.locales = { en: { domain: 'app', locale_data: { app: { '': {} } } } };
|
15
|
+
|
16
|
+
// see https://github.com/testing-library/dom-testing-library/releases/tag/v7.0.0
|
17
|
+
window.MutationObserver = MutationObserver;
|
metadata
CHANGED
@@ -1,151 +1,177 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ovirt
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 0
|
10
|
-
version: 0.3.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.1
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
-
|
14
|
-
autorequire:
|
6
|
+
authors:
|
7
|
+
- markt.de
|
15
8
|
bindir: bin
|
16
9
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: fog-ovirt
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: 2.0.3
|
19
|
+
type: :runtime
|
22
20
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
26
23
|
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
- !ruby/object:Gem::
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 2.0.3
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: ovirt-engine-sdk
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.6.0
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 4.6.0
|
40
|
+
- !ruby/object:Gem::Dependency
|
35
41
|
name: rdoc
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
type: :development
|
36
48
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rubocop
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
47
61
|
type: :development
|
48
|
-
version_requirements: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: bundler
|
51
62
|
prerelease: false
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: simplecov
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
63
75
|
type: :development
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: jeweler
|
67
76
|
prerelease: false
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: theforeman-rubocop
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0.1'
|
79
89
|
type: :development
|
80
|
-
|
81
|
-
|
82
|
-
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0.1'
|
96
|
+
description: The ForemanOvirt plugin adds oVirt compute resource to Foreman using
|
97
|
+
fog-ovirt. It is compatible with Foreman 3.16+
|
98
|
+
email:
|
99
|
+
- github-oss-noreply@markt.de
|
83
100
|
executables: []
|
84
|
-
|
85
101
|
extensions: []
|
86
|
-
|
87
|
-
|
88
|
-
- LICENSE
|
89
|
-
- README.
|
90
|
-
files:
|
91
|
-
- .document
|
92
|
-
- Gemfile
|
93
|
-
- Gemfile.lock
|
94
|
-
- LICENSE.txt
|
95
|
-
- README.rdoc
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- LICENSE
|
105
|
+
- README.md
|
96
106
|
- Rakefile
|
97
|
-
-
|
98
|
-
- app/
|
99
|
-
- app/
|
100
|
-
- app/
|
101
|
-
- app/
|
102
|
-
- app/
|
103
|
-
- app/
|
104
|
-
- app/
|
105
|
-
- app/
|
106
|
-
- app/
|
107
|
-
- app/
|
108
|
-
- app/
|
109
|
-
- app/views/
|
110
|
-
- app/views/
|
111
|
-
- app/views/
|
112
|
-
-
|
107
|
+
- app/assets/javascripts/foreman_ovirt/display.js
|
108
|
+
- app/assets/javascripts/foreman_ovirt/host_edit.js
|
109
|
+
- app/assets/javascripts/foreman_ovirt/nic_info.js
|
110
|
+
- app/assets/javascripts/foreman_ovirt/ovirt.js
|
111
|
+
- app/controllers/concerns/foreman_ovirt/compute_resources_vms_controller.rb
|
112
|
+
- app/controllers/concerns/foreman_ovirt/parameters_extension.rb
|
113
|
+
- app/controllers/foreman_ovirt/concerns/compute_resources_controller_extensions.rb
|
114
|
+
- app/helpers/ovirt_compute_resource_helper.rb
|
115
|
+
- app/models/concerns/fog_extensions/ovirt/server.rb
|
116
|
+
- app/models/concerns/fog_extensions/ovirt/template.rb
|
117
|
+
- app/models/concerns/fog_extensions/ovirt/volume.rb
|
118
|
+
- app/models/foreman_ovirt/ovirt.rb
|
119
|
+
- app/views/api/v2/compute_resources/ovirt.json.rabl
|
120
|
+
- app/views/compute_resources/form/_ovirt.html.erb
|
121
|
+
- app/views/compute_resources/show/_ovirt.html.erb
|
122
|
+
- app/views/compute_resources_vms/form/ovirt/_base.html.erb
|
123
|
+
- app/views/compute_resources_vms/form/ovirt/_network.html.erb
|
124
|
+
- app/views/compute_resources_vms/form/ovirt/_volume.html.erb
|
125
|
+
- app/views/compute_resources_vms/index/_ovirt.html.erb
|
126
|
+
- app/views/compute_resources_vms/index/_ovirt_json.erb
|
127
|
+
- app/views/compute_resources_vms/show/_ovirt.html.erb
|
128
|
+
- app/views/images/form/_ovirt.html.erb
|
113
129
|
- config/routes.rb
|
114
|
-
-
|
115
|
-
- lib/engine.rb
|
130
|
+
- db/migrate/20250810212811_update_legacy_ovirt_compute_resource_type.rb
|
116
131
|
- lib/foreman_ovirt.rb
|
117
|
-
|
118
|
-
|
119
|
-
-
|
120
|
-
|
132
|
+
- lib/foreman_ovirt/engine.rb
|
133
|
+
- lib/foreman_ovirt/version.rb
|
134
|
+
- lib/tasks/foreman_ovirt_tasks.rake
|
135
|
+
- locale/Makefile
|
136
|
+
- locale/en/foreman_ovirt.po
|
137
|
+
- locale/foreman_ovirt.pot
|
138
|
+
- locale/gemspec.rb
|
139
|
+
- package.json
|
140
|
+
- test/factories/foreman_ovirt_factories.rb
|
141
|
+
- test/test_plugin_helper.rb
|
142
|
+
- test/unit/foreman_ovirt_test.rb
|
143
|
+
- webpack/components/extensions/HostDetails/DetailsTabCards/OvirtCard.js
|
144
|
+
- webpack/components/ovirt.js
|
145
|
+
- webpack/global_index.js
|
146
|
+
- webpack/global_test_setup.js
|
147
|
+
- webpack/index.js
|
148
|
+
- webpack/test_setup.js
|
149
|
+
homepage: https://github.com/markt-de/foreman_ovirt
|
150
|
+
licenses:
|
151
|
+
- GPL-3.0
|
152
|
+
metadata:
|
153
|
+
is_foreman_plugin: 'true'
|
121
154
|
rdoc_options: []
|
122
|
-
|
123
|
-
require_paths:
|
155
|
+
require_paths:
|
124
156
|
- lib
|
125
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
-
|
127
|
-
requirements:
|
157
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
128
159
|
- - ">="
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
version:
|
134
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
|
-
|
136
|
-
requirements:
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '2.7'
|
162
|
+
- - "<"
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '4'
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
137
167
|
- - ">="
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
|
140
|
-
segments:
|
141
|
-
- 0
|
142
|
-
version: "0"
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
143
170
|
requirements: []
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
171
|
+
rubygems_version: 3.6.9
|
172
|
+
specification_version: 4
|
173
|
+
summary: oVirt as a compute resource for The Foreman
|
174
|
+
test_files:
|
175
|
+
- test/factories/foreman_ovirt_factories.rb
|
176
|
+
- test/test_plugin_helper.rb
|
177
|
+
- test/unit/foreman_ovirt_test.rb
|
data/.document
DELETED
data/Gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
source "http://rubygems.org"
|
2
|
-
# Add dependencies required to use your gem here.
|
3
|
-
# Example:
|
4
|
-
# gem "activesupport", ">= 2.3.5"
|
5
|
-
|
6
|
-
# Add dependencies to develop your gem here.
|
7
|
-
# Include everything needed to run rake, tests, features, etc.
|
8
|
-
group :development do
|
9
|
-
gem "shoulda", ">= 0"
|
10
|
-
gem "rdoc", "~> 3.12"
|
11
|
-
gem "bundler", "~> 1.2.2"
|
12
|
-
gem "jeweler", "~> 1.8.4"
|
13
|
-
# gem "rcov", ">= 0"
|
14
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activesupport (3.2.9)
|
5
|
-
i18n (~> 0.6)
|
6
|
-
multi_json (~> 1.0)
|
7
|
-
git (1.2.5)
|
8
|
-
i18n (0.6.1)
|
9
|
-
jeweler (1.8.4)
|
10
|
-
bundler (~> 1.0)
|
11
|
-
git (>= 1.2.5)
|
12
|
-
rake
|
13
|
-
rdoc
|
14
|
-
json (1.7.5)
|
15
|
-
multi_json (1.3.7)
|
16
|
-
rake (10.0.2)
|
17
|
-
rdoc (3.12)
|
18
|
-
json (~> 1.4)
|
19
|
-
shoulda (3.3.2)
|
20
|
-
shoulda-context (~> 1.0.1)
|
21
|
-
shoulda-matchers (~> 1.4.1)
|
22
|
-
shoulda-context (1.0.1)
|
23
|
-
shoulda-matchers (1.4.1)
|
24
|
-
activesupport (>= 3.0.0)
|
25
|
-
|
26
|
-
PLATFORMS
|
27
|
-
ruby
|
28
|
-
|
29
|
-
DEPENDENCIES
|
30
|
-
bundler (~> 1.2.2)
|
31
|
-
jeweler (~> 1.8.4)
|
32
|
-
rdoc (~> 3.12)
|
33
|
-
shoulda
|
data/README.rdoc
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
= foreman_ovirt
|
2
|
-
|
3
|
-
Test engine for ovirt-foreman integration
|
4
|
-
|
5
|
-
= Install
|
6
|
-
|
7
|
-
1. gem install foreman_ovirt
|
8
|
-
2. Add bundler.d folder in Foreman a file called foreman_ovirt, containing the line:
|
9
|
-
gem 'foreman_ovirt'
|
10
|
-
|
11
|
-
= Usage
|
12
|
-
|
13
|
-
See the README-foreman-plugin in the oVirt plugin repository (http://gerrit.ovirt.org/p/samples-uiplugins.git) for guidelines on what to do in the oVirt engine server.
|
14
|
-
Also see ovedou.blogspot.com for more information, as I have a blog post on that.
|
15
|
-
|
16
|
-
== Copyright
|
17
|
-
|
18
|
-
Copyright (c) 2012 Oved Ourfali. See LICENSE.txt for
|
19
|
-
further details.
|
20
|
-
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.0
|
@@ -1,57 +0,0 @@
|
|
1
|
-
module ForemanOvirt
|
2
|
-
class AuthSourceOvirtsController < ApplicationController
|
3
|
-
layout 'layouts/application_ovirt'
|
4
|
-
skip_before_filter :verify_authenticity_token
|
5
|
-
def index
|
6
|
-
@auth_source_ovirts = AuthSourceOvirt.all
|
7
|
-
respond_to do |format|
|
8
|
-
format.html { }
|
9
|
-
format.json { render :json => @auth_source_ovirts }
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def show
|
14
|
-
@auth_source_ovirt = AuthSourceOvirt.find(params[:id])
|
15
|
-
respond_to do |format|
|
16
|
-
format.html { }
|
17
|
-
format.json { render :json => @auth_source_ovirt }
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def new
|
22
|
-
@auth_source_ovirt = AuthSourceOvirt.new
|
23
|
-
end
|
24
|
-
|
25
|
-
def create
|
26
|
-
@auth_source_ovirt = AuthSourceOvirt.new(params[:foreman_ovirt_auth_source_ovirt])
|
27
|
-
if @auth_source_ovirt.save
|
28
|
-
process_success
|
29
|
-
else
|
30
|
-
process_error
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def edit
|
35
|
-
@auth_source_ovirt = AuthSourceOvirt.find(params[:id])
|
36
|
-
end
|
37
|
-
|
38
|
-
def update
|
39
|
-
@auth_source_ovirt = AuthSourceOvirt.find(params[:id])
|
40
|
-
if @auth_source_ovirt.update_attributes(params[:foreman_ovirt_auth_source_ovirt])
|
41
|
-
process_success
|
42
|
-
else
|
43
|
-
process_error
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def destroy
|
48
|
-
@auth_source_ovirt = AuthSourceOvirt.find(params[:id])
|
49
|
-
if @auth_source_ovirt.destroy
|
50
|
-
process_success
|
51
|
-
else
|
52
|
-
process_error
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|