Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,57 @@ __Returns__
* [`CheckStatus.SKIPPED`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkstatus) when there are no jobs on a
device.

### `CheckFirewall.check_global_jumbo_frame`

```python
def check_global_jumbo_frame(mode: bool = None) -> CheckResult
```

Check if the global jumbo frame configuration matches the desired mode.

__Parameters__


- __mode__ (`bool`): The desired mode of the global jumbo frame configuration.

__Returns__


`CheckResult`: Object of [`CheckResult`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkresult) class taking value of:

* [`CheckStatus.SUCCESS`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkstatus) when the global jumbo frame
mode matches the desired mode.
* [`CheckStatus.FAIL`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkstatus) when the current global jumbo
frame and the desired modes differ.
* [`CheckStatus.SKIPPED`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkstatus) when `mode` is not provided.

### `CheckFirewall.check_system_environmentals`

```python
def check_system_environmentals(
components: Optional[List[str]] = None) -> CheckResult
```

Check system environmentals for alarms.

__Parameters__


- __components__ (`list(str), optional`): (defaults to None) List of components to check for alarms.
If None, all components are checked. Valid components are 'thermal', 'fantray', 'fan', 'power', 'power-supply'.

__Returns__


`CheckResult`: Object of [`CheckResult`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkresult) class taking value of:

* [`CheckStatus.SUCCESS`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkstatus) if no alarms are found in the
specified components.
* [`CheckStatus.FAIL`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkstatus) if any alarm is found in specified
components.
* [`CheckStatus.ERROR`](/panos/docs/panos-upgrade-assurance/api/utils#class-checkstatus) when invalid components are
specified or device did not return environmentals.

### `CheckFirewall.get_content_db_version`

```python
Expand Down Expand Up @@ -603,6 +654,25 @@ __Returns__
}
```

### `CheckFirewall.get_global_jumbo_frame`

```python
def get_global_jumbo_frame() -> Dict[str, bool]
```

Get whether global jumbo frame configuration is set or not.

__Returns__


`dict`: The global jumbo frame configuration.

```python showLineNumbers title="Example"
{
'mode': True
}
```

### `CheckFirewall.run_readiness_checks`

```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,21 @@ __Returns__

`bool`: `True` when connection is up, `False` otherwise.

### `FirewallProxy.is_global_jumbo_frame_set`

```python
def is_global_jumbo_frame_set() -> bool
```

Get the global jumbo frame configuration.

The actual API command is `show system setting jumbo-frame`.

__Returns__


`bool`: `True` when global jumbo frame configuration is on, `False` otherwise.

### `FirewallProxy.get_ha_configuration`

```python
Expand Down Expand Up @@ -1379,3 +1394,83 @@ __Returns__
datetime(2024, 01, 01, 00, 00, 00)
```

### `FirewallProxy.get_system_environmentals`

```python
def get_system_environmentals() -> dict
```

Get system environmental data.

The actual API command is `show system environmentals`.

__Returns__


`dict`: System environmental data including thermal, fantray, fan, power, and power-supply information.
Sample output has been shortened for the sake of simplicity.

```python showLineNumbers title="Sample output"
{'fan': {'Slot1': {'entry': [{'RPMs': '3435',
'alarm': 'False',
'description': 'Fan `1` RPM',
'min': '1000',
'slot': '1'},
{'RPMs': '3379',
'alarm': 'False',
'description': 'Fan `2` RPM',
'min': '1000',
'slot': '1'},
{'RPMs': '3355',
'alarm': 'False',
'description': 'Fan `3` RPM',
'min': '1000',
'slot': '1'}]}},
'fantray': {'Slot1': {'entry': {'Inserted': 'True',
'alarm': 'False',
'description': 'Fan Tray',
'min': '1',
'slot': '1'}}},
'power': {'Slot1': {'entry': [{'Volts': '1.7939999999999998',
'alarm': 'False',
'description': 'Power: MP - 1.8V VCCIN',
'max': '1.98',
'min': '1.62',
'slot': '1'},
{'Volts': '1.8046666666666666',
'alarm': 'False',
'description': 'Power: DP - 1.8V Power Rail',
'max': '1.98',
'min': '1.62',
'slot': '1'}]}},
'power-supply': {'Slot1': {'entry': [{'Inserted': 'False',
'alarm': 'True',
'description': 'Power Supply `1` (left)',
'min': 'True',
'slot': '1'},
{'Inserted': 'True',
'alarm': 'False',
'description': 'Power Supply `2` (right)',
'min': 'True',
'slot': '1'}]}},
'thermal': {'Slot0': {'entry': {'DegreesC': '29.8',
'alarm': 'False',
'description': 'Temperature: Broadwell MP '
'Core',
'max': '70.0',
'min': '-5.0',
'slot': '0'}},
'Slot1': {'entry': [{'DegreesC': '36.5',
'alarm': 'False',
'description': 'Temperature @ Rear Left[U54]',
'max': '70.0',
'min': '-5.0',
'slot': '1'},
{'DegreesC': '46.2',
'alarm': 'False',
'description': 'Temperature: FE100 Core',
'max': '70.0',
'min': '-5.0',
'slot': '1'}]}}}
```

8 changes: 4 additions & 4 deletions products/panos/docs/panos-upgrade-assurance/api/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,22 +378,22 @@ __Returns__
def interpret_yes_no(boolstr: str) -> bool
```

Interpret `yes`/`no` as booleans.
Interpret `yes`/`no` and `on`/`off` as booleans.

__Parameters__


- __boolstr__ (`str`): `yes` or `no`, a typical device response for simple boolean-like queries.
- __boolstr__ (`str`): `yes`, `no`, `on` or `off`, a typical device response for simple boolean-like queries.

__Raises__


- `WrongDataTypeException`: An exception is raised when `boolstr` is neither `yes` or `no`.
- `WrongDataTypeException`: An exception is raised when `boolstr` is neither `yes`, `no`, `on` or `off`.

__Returns__


`bool`: `True` for *yes*, `False` for *no*.
`bool`: `True` for *yes* / *on*, `False` otherwise.

### `printer`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,54 @@ checks_configuration:
```


### `environmentals`

This check examines the system environmentals for any alarms. It can be configured to check specific components or all components if none are specified.

**Method:** [`CheckFirewall.check_system_environmentals()`](/panos/docs/panos-upgrade-assurance/api/check_firewall#checkfirewallcheck_system_environmentals)

**Configuration parameters**

parameter | description
--- | ---
`components` | (optional) List of components to check for alarms. If not provided, all components are checked. Valid components are: 'thermal', 'fantray', 'fan', 'power', 'power-supply'.

**Sample configuration**

```mdx-code-block
<Tabs>
<TabItem value="python" label="Python" default>
```

```python showLineNumbers
checks_configuration = [
{
'environmentals': {
'components': ['thermal', 'power']
}
}
]
```

```mdx-code-block
</TabItem>
<TabItem value="ansible" label="YAML">
```

```yaml showLineNumbers
checks_configuration:
- environmentals:
components:
- thermal
- power
```

```mdx-code-block
</TabItem>
</Tabs>
```


### `expired_licenses`

Checks and reports expired licenses.
Expand Down