foreman_nutanix 0.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.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +32 -0
  4. data/Rakefile +49 -0
  5. data/app/assets/javascripts/foreman_nutanix/locale/en/foreman_nutanix.js +55 -0
  6. data/app/controllers/concerns/foreman/controller/parameters/compute_resource_extension.rb +17 -0
  7. data/app/controllers/foreman_nutanix/api/v2/apipie_extensions.rb +16 -0
  8. data/app/controllers/foreman_nutanix/api/v2/compute_resources_extensions.rb +29 -0
  9. data/app/controllers/foreman_nutanix/api/v2/hosts_controller_extensions.rb +50 -0
  10. data/app/lib/foreman_nutanix/nutanix_adapter.rb +105 -0
  11. data/app/lib/nutanix_compute/compute_collection.rb +23 -0
  12. data/app/lib/nutanix_extensions/attached_disk.rb +22 -0
  13. data/app/models/concerns/foreman_nutanix/host_managed_extensions.rb +38 -0
  14. data/app/models/foreman_nutanix/nutanix.rb +471 -0
  15. data/app/models/foreman_nutanix/nutanix_compute.rb +370 -0
  16. data/app/views/compute_resources/form/_nutanix.html.erb +9 -0
  17. data/app/views/compute_resources/show/_nutanix.html.erb +238 -0
  18. data/app/views/compute_resources_vms/form/nutanix/_base.html.erb +72 -0
  19. data/app/views/compute_resources_vms/form/nutanix/_volume.html.erb +1 -0
  20. data/app/views/compute_resources_vms/index/_gce.html.erb +41 -0
  21. data/app/views/compute_resources_vms/index/_nutanix.html.erb +41 -0
  22. data/app/views/compute_resources_vms/show/_gce.html.erb +18 -0
  23. data/app/views/compute_resources_vms/show/_nutanix.html.erb +81 -0
  24. data/config/initializers/zeitwerk.rb +1 -0
  25. data/config/routes.rb +2 -0
  26. data/lib/foreman_nutanix/engine.rb +56 -0
  27. data/lib/foreman_nutanix/version.rb +3 -0
  28. data/lib/foreman_nutanix.rb +4 -0
  29. data/lib/tasks/foreman_nutanix_tasks.rake +31 -0
  30. data/locale/foreman_nutanix.pot +131 -0
  31. data/package.json +41 -0
  32. data/webpack/global_index.js +6 -0
  33. data/webpack/global_test_setup.js +11 -0
  34. data/webpack/index.js +7 -0
  35. data/webpack/legacy.js +16 -0
  36. data/webpack/src/Extends/index.js +15 -0
  37. data/webpack/src/Router/routes.js +5 -0
  38. data/webpack/src/reducers.js +7 -0
  39. data/webpack/test_setup.js +17 -0
  40. metadata +100 -0
@@ -0,0 +1,41 @@
1
+ <thead>
2
+ <tr>
3
+ <th><%= _("Name") %></th>
4
+ <th><%= _("Type") %></th>
5
+ <th><%= _("State") %></th>
6
+ <th><%= _("Actions") %></th>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <% @vms.each do |vm| %>
11
+ <% view_path =
12
+ hash_for_compute_resource_vm_path(
13
+ compute_resource_id: @compute_resource,
14
+ id: vm.identity,
15
+ ).merge(
16
+ auth_object: @compute_resource.id,
17
+ auth_action: "view",
18
+ authorizer: authorizer,
19
+ )
20
+ delete_link =
21
+ display_delete_if_authorized(
22
+ hash_for_compute_resource_vm_path(
23
+ compute_resource_id: @compute_resource,
24
+ id: vm.identity,
25
+ ).merge(auth_object: @compute_resource, authorizer: authorizer),
26
+ ) %>
27
+ <tr>
28
+ <td><%= link_to_if_authorized vm.name, view_path %></td>
29
+ <td><%= vm.pretty_machine_type %></td>
30
+ <td><%= vm.status.downcase %></td>
31
+ <td>
32
+ <%= action_buttons(
33
+ vm_power_action(vm, authorizer),
34
+ vm_import_action(vm),
35
+ vm_associate_link(vm),
36
+ delete_link,
37
+ ) %>
38
+ </td>
39
+ </tr>
40
+ <% end %>
41
+ </tbody>
@@ -0,0 +1,41 @@
1
+ <thead>
2
+ <tr>
3
+ <th><%= _("Name") %></th>
4
+ <th><%= _("Type") %></th>
5
+ <th><%= _("State") %></th>
6
+ <th><%= _("Actions") %></th>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <% @vms.each do |vm| %>
11
+ <% view_path =
12
+ hash_for_compute_resource_vm_path(
13
+ compute_resource_id: @compute_resource,
14
+ id: vm.identity,
15
+ ).merge(
16
+ auth_object: @compute_resource.id,
17
+ auth_action: "view",
18
+ authorizer: authorizer,
19
+ )
20
+ delete_link =
21
+ display_delete_if_authorized(
22
+ hash_for_compute_resource_vm_path(
23
+ compute_resource_id: @compute_resource,
24
+ id: vm.identity,
25
+ ).merge(auth_object: @compute_resource, authorizer: authorizer),
26
+ ) %>
27
+ <tr>
28
+ <td><%= link_to_if_authorized vm.name, view_path %></td>
29
+ <td><%= vm.pretty_machine_type %></td>
30
+ <td><%= vm.status.downcase %></td>
31
+ <td>
32
+ <%= action_buttons(
33
+ vm_power_action(vm, authorizer),
34
+ vm_import_action(vm),
35
+ vm_associate_link(vm),
36
+ delete_link,
37
+ ) %>
38
+ </td>
39
+ </tr>
40
+ <% end %>
41
+ </tbody>
@@ -0,0 +1,18 @@
1
+ <% title @vm.name %>
2
+
3
+ <div class='col-md-12'>
4
+ <table class="<%= table_css_classes %>">
5
+ <thead>
6
+ <tr><th colspan="2"><%= _("Properties") %></th></tr>
7
+ </thead>
8
+ <tbody>
9
+ <tr>
10
+ <td>Created</td>
11
+ <td><%= date_time_relative(@vm.creation_timestamp) %></td>
12
+ </tr>
13
+ <%= prop :private_ip_address %>
14
+ <%= prop :public_ip_address %>
15
+ <%= prop :pretty_image_name, _("Image") %>
16
+ </tbody>
17
+ </table>
18
+ </div>
@@ -0,0 +1,81 @@
1
+ <% title @vm.name %>
2
+
3
+ <table class="table table-bordered table-striped table-condensed">
4
+ <tbody>
5
+ <tr>
6
+ <td><%= _("Name") %></td>
7
+ <td><%= @vm.name %></td>
8
+ </tr>
9
+ <tr>
10
+ <td><%= _("Created") %></td>
11
+ <td><%= if @vm.creation_timestamp
12
+ date_time_relative(@vm.creation_timestamp)
13
+ else
14
+ _("Not available")
15
+ end %></td>
16
+ </tr>
17
+ <tr>
18
+ <td><%= _("Status") %></td>
19
+ <td><%= @vm.state %></td>
20
+ </tr>
21
+ <tr>
22
+ <td><%= _("Power State") %></td>
23
+ <td><%= @vm.power_state || _("Unknown") %></td>
24
+ </tr>
25
+ <tr>
26
+ <td><%= _("CPUs") %></td>
27
+ <td><%= @vm.cpu %></td>
28
+ </tr>
29
+ <tr>
30
+ <td><%= _("Memory") %></td>
31
+ <td><%= @vm.memory %>
32
+ GB</td>
33
+ </tr>
34
+ <tr>
35
+ <td><%= _("MAC Address") %></td>
36
+ <td><%= @vm.mac || _("Not available") %></td>
37
+ </tr>
38
+ <tr>
39
+ <td><%= _("IP Addresses") %></td>
40
+ <td><%= @vm.ip_addresses.join(", ") if @vm.ip_addresses.any? %></td>
41
+ </tr>
42
+ </tbody>
43
+ </table>
44
+
45
+ <% if @vm.ready? %>
46
+ <%= link_to_if_authorized _("Power Off"),
47
+ hash_for_power_compute_resource_vm_path(
48
+ compute_resource_id: @compute_resource,
49
+ id: @vm.identity,
50
+ ).merge(
51
+ auth_object: @compute_resource,
52
+ permission: "power_compute_resources_vms",
53
+ ),
54
+ confirm: _("Are you sure?"),
55
+ method: :put,
56
+ class: "btn btn-danger" %>
57
+ <% else %>
58
+ <%= link_to_if_authorized _("Power On"),
59
+ hash_for_power_compute_resource_vm_path(
60
+ compute_resource_id: @compute_resource,
61
+ id: @vm.identity,
62
+ ).merge(
63
+ auth_object: @compute_resource,
64
+ permission: "power_compute_resources_vms",
65
+ ),
66
+ confirm: _("Are you sure?"),
67
+ method: :put,
68
+ class: "btn btn-success" %>
69
+ <% end %>
70
+
71
+ <%= link_to_if_authorized _("Delete"),
72
+ hash_for_compute_resource_vm_path(
73
+ compute_resource_id: @compute_resource,
74
+ id: @vm.identity,
75
+ ).merge(
76
+ auth_object: @compute_resource,
77
+ permission: "destroy_compute_resources_vms",
78
+ ),
79
+ confirm: _("Are you sure?"),
80
+ method: :delete,
81
+ class: "btn btn-danger" %>
@@ -0,0 +1 @@
1
+
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ Rails.application.routes.draw do
2
+ end
@@ -0,0 +1,56 @@
1
+ module ForemanNutanix
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace ForemanNutanix
4
+ engine_name 'foreman_nutanix'
5
+
6
+ # Add any db migrations
7
+ initializer 'foreman_nutanix.load_app_instance_data' do |app|
8
+ ForemanNutanix::Engine.paths['db/migrate'].existent.each do |path|
9
+ app.config.paths['db/migrate'] << path
10
+ end
11
+ end
12
+
13
+ # Register the plugin with Foreman
14
+ initializer 'foreman_nutanix.register_plugin', before: :finisher_hook do |_app|
15
+ Foreman::Plugin.register :foreman_nutanix do
16
+ requires_foreman '>= 3.14.0'
17
+ register_gettext
18
+
19
+ # Register the compute resource
20
+ in_to_prepare do
21
+ compute_resource(ForemanNutanix::Nutanix)
22
+ end
23
+ end
24
+ end
25
+
26
+ # Include extensions after all frameworks are loaded
27
+ config.to_prepare do
28
+ Rails.logger.info 'ForemanNutanix: Loading extensions'
29
+
30
+ # Include controller extensions
31
+ # require_dependency 'foreman_nutanix/api/v2/compute_resources_extensions'
32
+
33
+ # Include API extensions
34
+ ::Api::V2::ComputeResourcesController.include ForemanNutanix::Api::V2::ComputeResourcesExtensions
35
+ ::Api::V2::ComputeResourcesController.include Foreman::Controller::Parameters::ComputeResourceExtension
36
+ ::ComputeResourcesController.include Foreman::Controller::Parameters::ComputeResourceExtension
37
+
38
+ # Include host extensions
39
+ ::Host::Managed.include ForemanNutanix::HostManagedExtensions
40
+
41
+ # Include hosts controller extensions for power status
42
+ ::Api::V2::HostsController.include ForemanNutanix::Api::V2::HostsControllerExtensions
43
+
44
+ Rails.logger.info 'ForemanNutanix: Extensions loaded successfully'
45
+ rescue StandardError => e
46
+ Rails.logger.warn "ForemanNutanix: Error loading extensions: #{e.message}"
47
+ Rails.logger.warn e.backtrace.join("\n")
48
+ end
49
+
50
+ rake_tasks do
51
+ Rake::Task['db:seed'].enhance do
52
+ ForemanNutanix::Engine.load_seed
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,3 @@
1
+ module ForemanNutanix
2
+ VERSION = '0.0.1'.freeze
3
+ end
@@ -0,0 +1,4 @@
1
+ require 'foreman_nutanix/engine'
2
+
3
+ module ForemanNutanix
4
+ end
@@ -0,0 +1,31 @@
1
+ require 'rake/testtask'
2
+
3
+ # Tasks
4
+ namespace :foreman_nutanix do
5
+ namespace :example do
6
+ desc 'Example Task'
7
+ task task: :environment do
8
+ # Task goes here
9
+ end
10
+ end
11
+ end
12
+
13
+ # Tests
14
+ namespace :test do
15
+ desc 'Test ForemanNutanix'
16
+ Rake::TestTask.new(:foreman_nutanix) do |t|
17
+ test_dir = File.expand_path('../../test', __dir__)
18
+ t.libs << 'test'
19
+ t.libs << test_dir
20
+ t.pattern = "#{test_dir}/**/*_test.rb"
21
+ t.verbose = true
22
+ t.warning = false
23
+ end
24
+ end
25
+
26
+ Rake::Task[:test].enhance ['test:foreman_nutanix']
27
+
28
+ load 'tasks/jenkins.rake'
29
+ if Rake::Task.task_defined?(:'jenkins:unit')
30
+ Rake::Task['jenkins:unit'].enhance ['test:foreman_nutanix', 'foreman_nutanix:rubocop']
31
+ end
@@ -0,0 +1,131 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the foreman_nutanix package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: foreman_nutanix 1.0.0\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2025-02-20 10:11+0100\n"
12
+ "PO-Revision-Date: 2025-02-20 10:11+0100\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
20
+
21
+ #: ../app/controllers/foreman_nutanix/api/v2/apipie_extensions.rb:9
22
+ msgid "Certificate path, for Nutanix only"
23
+ msgstr ""
24
+
25
+ #: ../app/controllers/foreman_nutanix/api/v2/apipie_extensions.rb:10
26
+ msgid "Zone, for nutanix only"
27
+ msgstr ""
28
+
29
+ #: ../app/controllers/foreman_nutanix/api/v2/apipie_extensions.rb:11
30
+ msgid "Deprecated, project is automatically loaded from the JSON file. For nutanix only"
31
+ msgstr ""
32
+
33
+ #: ../app/controllers/foreman_nutanix/api/v2/apipie_extensions.rb:12
34
+ msgid "Deprecated, email is automatically loaded from the JSON file. For nutanix only"
35
+ msgstr ""
36
+
37
+ #: ../app/controllers/foreman_nutanix/api/v2/compute_resources_extensions.rb:25
38
+ msgid ""
39
+ "The email parameter is deprecated, value is automatically loaded from the JSON"
40
+ " file"
41
+ msgstr ""
42
+
43
+ #: ../app/controllers/foreman_nutanix/api/v2/compute_resources_extensions.rb:30
44
+ msgid ""
45
+ "The project parameter is deprecated, value is automatically loaded from the JS"
46
+ "ON file"
47
+ msgstr ""
48
+
49
+ #: ../app/models/foreman_nutanix/nutanix.rb:128
50
+ msgid "console is not available at this time because the instance is powered off"
51
+ msgstr ""
52
+
53
+ #: ../app/models/foreman_nutanix/nutanix.rb:172
54
+ msgid "Missing an image for operating system!"
55
+ msgstr ""
56
+
57
+ #: ../app/views/compute_resources/form/_nutanix.html.erb:3
58
+ msgid "JSON key"
59
+ msgstr ""
60
+
61
+ #: ../app/views/compute_resources/form/_nutanix.html.erb:9
62
+ #: ../app/views/compute_resources_vms/show/_nutanix.html.erb:11
63
+ msgid "Zone"
64
+ msgstr ""
65
+
66
+ #: ../app/views/compute_resources/form/_nutanix.html.erb:10
67
+ msgid "Load Zones"
68
+ msgstr ""
69
+
70
+ #: ../app/views/compute_resources_vms/form/nutanix/_base.html.erb:3
71
+ msgid "Machine type"
72
+ msgstr ""
73
+
74
+ #: ../app/views/compute_resources_vms/form/nutanix/_base.html.erb:12
75
+ msgid "Please select an image"
76
+ msgstr ""
77
+
78
+ #: ../app/views/compute_resources_vms/form/nutanix/_base.html.erb:13
79
+ #: ../app/views/compute_resources_vms/show/_nutanix.html.erb:18
80
+ msgid "Image"
81
+ msgstr ""
82
+
83
+ #: ../app/views/compute_resources_vms/form/nutanix/_base.html.erb:17
84
+ msgid "Network"
85
+ msgstr ""
86
+
87
+ #: ../app/views/compute_resources_vms/form/nutanix/_base.html.erb:18
88
+ msgid "Associate Ephemeral External IP"
89
+ msgstr ""
90
+
91
+ #: ../app/views/compute_resources_vms/form/nutanix/_volume.html.erb:5
92
+ msgid "Size (GB)"
93
+ msgstr ""
94
+
95
+ #: ../app/views/compute_resources_vms/index/_nutanix.html.erb:3
96
+ msgid "Name"
97
+ msgstr ""
98
+
99
+ #: ../app/views/compute_resources_vms/index/_nutanix.html.erb:4
100
+ msgid "Type"
101
+ msgstr ""
102
+
103
+ #: ../app/views/compute_resources_vms/index/_nutanix.html.erb:5
104
+ msgid "State"
105
+ msgstr ""
106
+
107
+ #: ../app/views/compute_resources_vms/index/_nutanix.html.erb:6
108
+ msgid "Actions"
109
+ msgstr ""
110
+
111
+ #: ../app/views/compute_resources_vms/show/_nutanix.html.erb:6
112
+ msgid "Properties"
113
+ msgstr ""
114
+
115
+ #: ../app/views/compute_resources_vms/show/_nutanix.html.erb:10
116
+ msgid "Machine Type"
117
+ msgstr ""
118
+
119
+ #: ../app/views/images/form/_nutanix.html.erb:1
120
+ msgid ""
121
+ "The user that is used to ssh into the instance, normally cloud-user, ec2-user,"
122
+ " ubuntu, etc. Note: nutanix engine doesn't support SSH for the root user."
123
+ msgstr ""
124
+
125
+ #: ../app/views/images/form/_nutanix.html.erb:3
126
+ msgid "Does this image support user data input (e.g. via cloud-init)?"
127
+ msgstr ""
128
+
129
+ #: gemspec.rb:2
130
+ msgid "nutanix Compute Engine plugin for the Foreman."
131
+ msgstr ""
data/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "foreman_nutanix",
3
+ "version": "1.0.0",
4
+ "description": "DESCRIPTION",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "lint": "tfm-lint --plugin -d /webpack",
8
+ "test": "tfm-test --config jest.config.js",
9
+ "test:watch": "tfm-test --plugin --watchAll",
10
+ "test:current": "tfm-test --plugin --watch",
11
+ "publish-coverage": "tfm-publish-coverage",
12
+ "create-react-component": "yo react-domain"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git@github.com:norceresearch/foreman_nutanix.git"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/norceresearch/foreman_nutanix"
20
+ },
21
+ "peerDependencies": {
22
+ "@theforeman/vendor": ">= 8.16.0"
23
+ },
24
+ "dependencies": {
25
+ "react-intl": "^2.8.0"
26
+ },
27
+ "devDependencies": {
28
+ "@babel/core": "^7.7.0",
29
+ "@sheerun/mutationobserver-shim": "^0.3.3",
30
+ "@theforeman/builder": ">= 12.0.1",
31
+ "@theforeman/eslint-plugin-foreman": "^10.0",
32
+ "@theforeman/find-foreman": "^10.0",
33
+ "@theforeman/test": "^10.0",
34
+ "@theforeman/vendor-dev": "^10.0",
35
+ "babel-eslint": "^10.0.3",
36
+ "eslint": "^6.7.2",
37
+ "prettier": "^1.19.1",
38
+ "stylelint-config-standard": "^18.0.0",
39
+ "stylelint": "^9.3.0"
40
+ }
41
+ }
@@ -0,0 +1,6 @@
1
+ import { registerRoutes } from "foremanReact/routes/RoutingService";
2
+ import Routes from "./src/Router/routes";
3
+ import { registerLegacy } from "./legacy";
4
+
5
+ registerRoutes("ForemanNutanix", Routes);
6
+ registerLegacy();
@@ -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,7 @@
1
+ import componentRegistry from 'foremanReact/components/componentRegistry';
2
+
3
+ // register components for erb mounting
4
+ componentRegistry.register({
5
+ // name: 'Component',
6
+ // type: Component,
7
+ });
data/webpack/legacy.js ADDED
@@ -0,0 +1,16 @@
1
+ const jsonLoader = (input) => {
2
+ const file = input.files[0];
3
+ const reader = new FileReader();
4
+ reader.onload = () => {
5
+ const text = reader.result;
6
+ const outputTextField = document.getElementById("nutanix_json");
7
+ outputTextField.value = text;
8
+ };
9
+ reader.readAsText(file);
10
+ };
11
+
12
+ export const registerLegacy = () => {
13
+ window.tfm = Object.assign(window.tfm || {}, {
14
+ nutanix: { jsonLoader },
15
+ });
16
+ };
@@ -0,0 +1,15 @@
1
+ // This is an example of extending foreman-core's component via slot&fill
2
+ // http://foreman.surge.sh/?path=/docs/introduction-slot-and-fill--page
3
+ /*
4
+ import React from 'react';
5
+ import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
6
+
7
+ addGlobalFill('slotId', 'fillId', <SomeComponent key="some-key" />, 300);
8
+
9
+ addGlobalFill(
10
+ 'slotId',
11
+ 'fillId',
12
+ { someProp: 'this is an override prop' },
13
+ 300
14
+ );
15
+ */
@@ -0,0 +1,5 @@
1
+ // import React from 'react';
2
+
3
+ const routes = [];
4
+
5
+ export default routes;
@@ -0,0 +1,7 @@
1
+ import { combineReducers } from "redux";
2
+
3
+ const reducers = {
4
+ ForemanNutanix: combineReducers({}),
5
+ };
6
+
7
+ export default reducers;
@@ -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 ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: foreman_nutanix
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - The Foreman Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-11-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rdoc
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Nutanix compute resource plugin for Foreman
28
+ email:
29
+ - dev@community.theforeman.org
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - app/assets/javascripts/foreman_nutanix/locale/en/foreman_nutanix.js
38
+ - app/controllers/concerns/foreman/controller/parameters/compute_resource_extension.rb
39
+ - app/controllers/foreman_nutanix/api/v2/apipie_extensions.rb
40
+ - app/controllers/foreman_nutanix/api/v2/compute_resources_extensions.rb
41
+ - app/controllers/foreman_nutanix/api/v2/hosts_controller_extensions.rb
42
+ - app/lib/foreman_nutanix/nutanix_adapter.rb
43
+ - app/lib/nutanix_compute/compute_collection.rb
44
+ - app/lib/nutanix_extensions/attached_disk.rb
45
+ - app/models/concerns/foreman_nutanix/host_managed_extensions.rb
46
+ - app/models/foreman_nutanix/nutanix.rb
47
+ - app/models/foreman_nutanix/nutanix_compute.rb
48
+ - app/views/compute_resources/form/_nutanix.html.erb
49
+ - app/views/compute_resources/show/_nutanix.html.erb
50
+ - app/views/compute_resources_vms/form/nutanix/_base.html.erb
51
+ - app/views/compute_resources_vms/form/nutanix/_volume.html.erb
52
+ - app/views/compute_resources_vms/index/_gce.html.erb
53
+ - app/views/compute_resources_vms/index/_nutanix.html.erb
54
+ - app/views/compute_resources_vms/show/_gce.html.erb
55
+ - app/views/compute_resources_vms/show/_nutanix.html.erb
56
+ - config/initializers/zeitwerk.rb
57
+ - config/routes.rb
58
+ - lib/foreman_nutanix.rb
59
+ - lib/foreman_nutanix/engine.rb
60
+ - lib/foreman_nutanix/version.rb
61
+ - lib/tasks/foreman_nutanix_tasks.rake
62
+ - locale/foreman_nutanix.pot
63
+ - package.json
64
+ - webpack/global_index.js
65
+ - webpack/global_test_setup.js
66
+ - webpack/index.js
67
+ - webpack/legacy.js
68
+ - webpack/src/Extends/index.js
69
+ - webpack/src/Router/routes.js
70
+ - webpack/src/reducers.js
71
+ - webpack/test_setup.js
72
+ homepage: https://github.com/norceresearch/foreman_nutanix
73
+ licenses:
74
+ - MIT
75
+ metadata:
76
+ is_foreman_plugin: 'true'
77
+ rubygems_mfa_required: 'true'
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '2.7'
87
+ - - "<"
88
+ - !ruby/object:Gem::Version
89
+ version: '4'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ requirements: []
96
+ rubygems_version: 3.4.19
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: Nutanix plugin for Foreman
100
+ test_files: []