Skip to content
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

ITC-2829 New Module: Nutanix #1476

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,4 @@ plugins/UPSModule
plugins/VMwareSnapshotModule
plugins/CustomalertModule
plugins/SLAModule
plugins/NutanixModule
69 changes: 69 additions & 0 deletions src/Form/WizardSNMPV3Form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
// Copyright (C) <2015> <it-novum GmbH>
//
// This file is dual licensed
//
// 1.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 3 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

// 2.
// If you purchased an openITCOCKPIT Enterprise Edition you can use this file
// under the terms of the openITCOCKPIT Enterprise Edition license agreement.
// License agreement and license key will be shipped with the order
// confirmation.


namespace App\Form;

use Cake\Form\Form;
use Cake\Form\Schema;
use Cake\Validation\Validator;

/**
* Class WizardSNMPForm
* @package App\Form
*/
class WizardSNMPV3Form extends Form {
protected function _buildSchema(Schema $schema): Schema {
return $schema
->addField('securityName', ['type' => 'string'])
->addField('authPassword', ['type' => 'string'])
->addField('privacyProtocol', ['type' => 'string'])
->addField('authProtocol', ['type' => 'string'])
->addField('privacyPassword', ['type' => 'string'])
->addField('services', ['type' => 'array']);
}

public function validationDefault(Validator $validator): Validator {
$validator
->requirePresence('securityName')
->notEmptyString('securityName');
$validator
->requirePresence('authPassword')
->notEmptyString('authPassword');
$validator
->requirePresence('privacyProtocol')
->notEmptyString('privacyProtocol');
$validator
->requirePresence('authProtocol')
->notEmptyString('authProtocol');
$validator
->requirePresence('privacyPassword')
->notEmptyString('privacyPassword');

$validator
->notEmptyArray('services', __('Please select at least one service'));
return $validator;
}
}
7 changes: 7 additions & 0 deletions src/Model/Table/WizardAssignmentsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,13 @@ public function getPossibleWizardsOfModules($availableWizards = []) {
'description' => __('These checks will allow you to monitor your HP server'),
'image' => 'hp.svg',
'category' => ['hardware'],
],
'nutanix' => [
'type_id' => 'nutanix',
'title' => __('Nutanix'),
'description' => __('Monitor your Nutanix infrastructure'),
'image' => 'nutanix_logo.svg',
'category' => ['virtualization', 'cloud'],
]
];

Expand Down
20 changes: 20 additions & 0 deletions webroot/img/wizards/nutanix_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.