-
Notifications
You must be signed in to change notification settings - Fork 12
feat(ironic): panos driver base - PUC-2049 #2338
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
| # not use this file except in compliance with the License. You may obtain | ||
| # a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| # License for the specific language governing permissions and limitations | ||
| # under the License. | ||
| """PAN-OS Hardware Type for Palo Alto firewalls.""" | ||
|
|
||
| from ironic.drivers import generic | ||
| from ironic.drivers.modules import noop | ||
| from ironic.drivers.modules.network import neutron | ||
| from ironic.drivers.modules.storage import noop as noop_storage | ||
|
|
||
| from ironic_understack.drivers import panos_inspect | ||
| from ironic_understack.drivers import panos_management | ||
|
|
||
|
|
||
| class PanosHardware(generic.ManualManagementHardware): | ||
|
Contributor
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.
That also removes most of this file. The rename needs a note in |
||
| """Hardware type for Palo Alto (PAN-OS) firewalls. | ||
|
|
||
| Intended for nodes that represent Palo Alto firewall appliances | ||
| (PA-1410, PA-5410, etc.). These devices: | ||
| - Have no deploy ramdisk | ||
| - Are managed via PAN-OS XML API | ||
| - Use Neutron for network port binding | ||
| - Require custom inspect and management interfaces | ||
|
|
||
| All other interfaces (boot, power, deploy, raid, etc.) use no-op | ||
|
Contributor
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. This says boot, power, deploy and raid "use no-op implementations", then says two lines down that boot and power are inherited and use |
||
| implementations since they don't apply to firewall appliances. | ||
|
|
||
| Boot and power are inherited from ManualManagementHardware, which | ||
| uses FakePower (power state controlled by manual operator) since | ||
| there's no automated power management for these devices. | ||
| """ | ||
|
|
||
| @property | ||
| def supported_bios_interfaces(self): | ||
| """No BIOS on firewall appliances.""" | ||
| return [noop.NoBIOS] | ||
|
|
||
| @property | ||
| def supported_console_interfaces(self): | ||
| """Console access not supported via Ironic for PAN-OS.""" | ||
| return [noop.NoConsole] | ||
|
|
||
| @property | ||
| def supported_deploy_interfaces(self): | ||
| """No image deployment for firewall appliances.""" | ||
| return [noop.NoDeploy] | ||
|
|
||
| @property | ||
| def supported_firmware_interfaces(self): | ||
| """Firmware updates handled separately.""" | ||
| return [noop.NoFirmware] | ||
|
|
||
| @property | ||
| def supported_inspect_interfaces(self): | ||
| """Use custom PAN-OS inspect interface for hardware discovery.""" | ||
| return [panos_inspect.PanosInspect] | ||
|
|
||
| @property | ||
| def supported_management_interfaces(self): | ||
| """Use custom PAN-OS management interface for lifecycle operations.""" | ||
| return [panos_management.PanosManagement] | ||
|
|
||
| @property | ||
| def supported_network_interfaces(self): | ||
| """Use Neutron for network port binding.""" | ||
| return [neutron.NeutronNetwork] | ||
|
|
||
| @property | ||
| def supported_raid_interfaces(self): | ||
| """No RAID on firewall appliances.""" | ||
| return [noop.NoRAID] | ||
|
|
||
| @property | ||
| def supported_rescue_interfaces(self): | ||
| """Rescue mode not applicable to firewall appliances.""" | ||
| return [noop.NoRescue] | ||
|
|
||
| @property | ||
| def supported_storage_interfaces(self): | ||
| """No storage management for firewall appliances.""" | ||
| return [noop_storage.NoopStorage] | ||
|
|
||
| @property | ||
| def supported_vendor_interfaces(self): | ||
| """No vendor-specific passthrough needed.""" | ||
| return [noop.NoVendor] | ||
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.
Credentials should not arrive as files mounted from a Secret.
ironic_understack/conf/__init__.pyalready registers anironic_understackoption group viasetup_conf(), and these belong there ascfg.StrOptwithsecret=Trueso they stay out of logs and config dumps.That drops this mount and volume, the
/etc/panos-credentialspath handling inpanos_inspect.validate(), and the cross-packagecredential()call. It also closes a gap this PR leaves open: nothing in the tree creates thepanos-credentialsSecret, while every other external secret here is provisioned through anExternalSecret.