[fuel-devops] Add support for printing VM ips in dhcp admin-network to dos.py

Bug #1658630 reported by Matthew Mosesohn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Undecided
Matthew Mosesohn

Bug Description

fuel-devops dos.py should be able to support the following use case:
. fuel-devops-3.x/bin/activate
export $necessary_vars
dos.py create myenv.yaml
dos.py net-list $myenv
dos.py net-list $myenv --node-ips admin

or alternately
dos.py list-node-ips $myenv admin

It is possible and has been implemented by QA team and former Solar team to call this function in fuel-devops by an external python client. This should reduce code drift and unmaintained standalone implementations.

Changed in fuel:
milestone: none → 11.0
assignee: nobody → Fuel DevOps (fuel-devops)
description: updated
Revision history for this message
Andrey Nikitin (heos) wrote :

Fuel QA team is responsible for the "fuel devops" framework.

Changed in fuel:
assignee: Fuel DevOps (fuel-devops) → Fuel QA Team (fuel-qa)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-devops (master)

Fix proposed to branch: master
Review: https://review.openstack.org/424147

Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Matthew Mosesohn (raytrac3r)
status: New → In Progress
Changed in fuel:
assignee: Matthew Mosesohn (raytrac3r) → Anton Studenov (astudenov)
Revision history for this message
Dennis Dmitriev (ddmitriev) wrote :

Matthew: merged as-is to unblock you, but the options should be more user-friendly, let's fix it in next patches.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-devops (master)

Reviewed: https://review.openstack.org/424147
Committed: https://git.openstack.org/cgit/openstack/fuel-devops/commit/?id=f774496e5d8a74ef5a1c7de581e6d32473b38887
Submitter: Jenkins
Branch: master

commit f774496e5d8a74ef5a1c7de581e6d32473b38887
Author: Anton Studenov <email address hidden>
Date: Tue Jan 24 13:59:53 2017 +0300

    Add logic to show slave node IPS

    New command dos.py slave-ips-list shows ALL IPs assigned
    to ALL nodes in an environment that have dhcp enabled.

    Change-Id: I9c5095dbba55a23660f9f20fab525de538ae8b08
    Closes-Bug: #1658630

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Dennis Dmitriev (ddmitriev) wrote :

The option should be extended to use YAML as a default output format:

* default behaviour:
dos.py slave-ip-list tcpcloud-mk22
admin-pool01:
  cfg01:172.16.10.100
  ctl01:172.16.10.101
  ctl02:172.16.10.102
  ...
private-pool01:
  cfg01:192.168.10.100
  ctl01:192.168.10.101
  ctl02:192.168.10.102
  ...

* filtered by specified address pool:
dos.py slave-ip-list tcpcloud-mk22 --address-pool=admin-pool01
cfg01:172.16.10.100
ctl01:172.16.10.101
ctl02:172.16.10.102
...

* inventory mode:
dos.py slave-ip-list tcpcloud-mk22 --address-pool=admin-pool01 --ip-only
- 172.16.10.100
- 172.16.10.101
- 172.16.10.102
...

* inventory mode (single line for easy parsing from shell):
dos.py slave-ip-list tcpcloud-mk22 --address-pool=admin-pool01 --ip-only-plain
172.16.10.100 172.16.10.101 172.16.10.102 ...

Changed in fuel:
status: Fix Committed → In Progress
assignee: Anton Studenov (astudenov) → Matthew Mosesohn (raytrac3r)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-devops (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/436136

Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-devops (master)

Reviewed: https://review.openstack.org/436136
Committed: https://git.openstack.org/cgit/openstack/fuel-devops/commit/?id=9d9b495c5b9ced42a69446d0bf18612d7eb43315
Submitter: Jenkins
Branch: master

commit 9d9b495c5b9ced42a69446d0bf18612d7eb43315
Author: Dennis Dmitriev <email address hidden>
Date: Mon Feb 20 20:24:15 2017 +0200

    Extend 'slave-ip-list' CLI options

    - show address pool names or specify an --address-pool-name=<...>
    - show node names or set --ip-only flag

    Output examples:

    $ dos.py slave-ip-list ac_linear_test
    public-pool01: master,10.100.0.128 slave-0,10.100.0.129 slave-1,10.100.0.130
    neutron-pool01: master,10.100.2.2 slave-0,10.100.2.3 slave-1,10.100.2.4
    private-pool01: master,10.100.1.128 slave-0,10.100.1.129 slave-1,10.100.1.130

    $ dos.py slave-ip-list ac_linear_test --ip-only
    public-pool01: 10.100.0.128 10.100.0.129 10.100.0.130
    neutron-pool01: 10.100.2.2 10.100.2.3 10.100.2.4
    private-pool01: 10.100.1.128 10.100.1.129 10.100.1.130

    $ dos.py slave-ip-list ac_linear_test --address-pool-name=public-pool01
    master,10.100.0.128 slave-0,10.100.0.129 slave-1,10.100.0.130

    $ dos.py slave-ip-list ac_linear_test --address-pool-name=public-pool01 --ip-only
    10.100.0.128 10.100.0.129 10.100.0.130

    Change-Id: I75635f73b90f37d9e50de1772bc7da6720c41cec
    Related-Bug:#1658630

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.