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

Add: concept of preset to zapper-iot connector #401

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

p-gentili
Copy link
Contributor

@p-gentili p-gentili commented Nov 12, 2024

Description

This PR adds support for the preset key in the provision_data for zapper-iot connector.

Some minor changes:

  • renamed url to urls
  • overwrite the username/password
  • passing reboot_script from config

Resolved issues

Part of ZAP-998

Documentation

N/A

Web service API changes

N/A

Tests

Tested running testflinger-device-connector zapper_iot provision --config config.yaml job.json with

# config.yaml
device_ip: 10.102.162.85
control_host: 10.102.242.85
reboot_script:
  - snmpset -c private -v2c 10.102.196.146 .1.3.6.1.4.1.13742.6.4.1.2.1.2.1.8 i 0
  - sleep 30
  - snmpset -c private -v2c 10.102.196.146 .1.3.6.1.4.1.13742.6.4.1.2.1.2.1.8 i 1
  
# job.json
  {
    "provision_data": {
        "preset": "Tillamook",
        "urls": [
            "https://tel-image-cache.canonical.com/oem-share/tillamook/uc20/uc20-gm/tillamook-core-20-gm-20230905-16.tar.gz"
        ]
    },
    "test_data": {
        "test_username": "admin",
        "test_password": "admin"
    }
}

@p-gentili p-gentili force-pushed the zapper-iot-preset branch 3 times, most recently from 8f83c47 to e37850f Compare December 9, 2024 13:32
@p-gentili p-gentili changed the title (DRAFT) Add: concept of preset to zapper-iot connector Add: concept of preset to zapper-iot connector Dec 12, 2024
@p-gentili p-gentili marked this pull request as ready for review December 12, 2024 16:10
@p-gentili p-gentili requested a review from a team as a code owner December 12, 2024 16:11
Copy link
Contributor

@kiya956 kiya956 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done some tests on my device, and I think it's good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants