Skip to content

Commit 9eb8d97

Browse files
authored
Merge pull request dell#2828 from Aditya-DP/telemetry_2.0
New architecture: Telemetry support
2 parents d04b284 + ab3408d commit 9eb8d97

17 files changed

+350
-694
lines changed

.github/workflows/ansible-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- staging
88
- release_1.7.1
99
- pub/new_architecture
10+
- pub/telemetry
1011

1112
jobs:
1213
build:

.github/workflows/pylint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pylint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- staging
8+
- pub/new_architecture
9+
- pub/telemetry
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.11"]
17+
env:
18+
PYLINT_THRESHOLD: 8 # 👈 Set your desired threshold here
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pylint
29+
- name: Analysing the code with pylint
30+
run: |
31+
pylint $(git ls-files '*.py') --fail-under=${PYLINT_THRESHOLD}

telemetry/roles/idrac_telemetry/tasks/filter_idrac.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515

1616
- name: Set iDRAC count incrementer
1717
ansible.builtin.set_fact:
18-
idrac_awx_count: "{{ idrac_awx_count | int + 1 }}"
18+
idrac_ip_count: "{{ idrac_ip_count | int + 1 }}"
1919
datacenter_license: false
2020
firmware_version: false
2121

2222
- name: Set iDRAC IP list
2323
ansible.builtin.set_fact:
24-
awx_idrac: "{{ awx_idrac + [item] }}"
24+
idrac_ip: "{{ idrac_ip + [item] }}"
2525

2626
- name: Filter iDRAC
2727
block:
2828
- name: Get system inventory
2929
dellemc.openmanage.idrac_system_info:
3030
idrac_ip: "{{ item }}"
31-
idrac_user: "{{ idrac_username }}"
32-
idrac_password: "{{ idrac_password }}"
31+
idrac_user: "{{ hostvars['localhost']['bmc_username'] }}"
32+
idrac_password: "{{ hostvars['localhost']['bmc_password'] }}"
3333
validate_certs: false
3434
register: idrac_system_info_cli
3535

@@ -52,8 +52,8 @@
5252
- name: Get firmware version
5353
dellemc.openmanage.idrac_firmware_info:
5454
idrac_ip: "{{ item }}"
55-
idrac_user: "{{ idrac_username }}"
56-
idrac_password: "{{ idrac_password }}"
55+
idrac_user: "{{ hostvars['localhost']['bmc_username'] }}"
56+
idrac_password: "{{ hostvars['localhost']['bmc_password'] }}"
5757
validate_certs: false
5858
register: idrac_firmware_info_cli
5959

@@ -78,8 +78,8 @@
7878

7979
- name: Set variables for filtered iDRACs
8080
when:
81-
- datacenter_license is true
82-
- firmware_version is true
81+
- datacenter_license
82+
- firmware_version
8383
block:
8484
- name: Set iDRAC list
8585
ansible.builtin.set_fact:
@@ -88,3 +88,16 @@
8888
- name: Set counter value
8989
ansible.builtin.set_fact:
9090
filtered_idrac_count: "{{ filtered_idrac_count | int + 1 }}"
91+
92+
- name: Set variables for unsupported iDRACs
93+
when:
94+
- not datacenter_license
95+
- not firmware_version
96+
block:
97+
- name: Set iDRAC list
98+
ansible.builtin.set_fact:
99+
failed_idrac: "{{ failed_idrac + [item] }}"
100+
101+
- name: Set counter value
102+
ansible.builtin.set_fact:
103+
failed_idrac_count: "{{ failed_idrac_count | int + 1 }}"

telemetry/roles/idrac_telemetry/tasks/idrac_telemetry_deployment.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)