Skip to content

Add stackbox status #20

@abhibongale

Description

@abhibongale

Implement stackbox status to show environment status: running containers, health, endpoints, and enrolled nodes.

Implementation

@cli.command()
def status():
    """Show environment status."""
    # Check containers
    containers = get_running_containers()
    
    click.echo("📊 StackBox Status\n")
    click.echo("Containers:")
    for c in containers:
        health = c['health']
        icon = '✅' if health == 'healthy' else '⚠️'
        click.echo(f"  {icon} {c['name']}: {c['status']} ({health})")
    
    # Check endpoints
    click.echo("\nEndpoints:")
    check_endpoint("Ironic API", "http://localhost:6385/")
    check_endpoint("BMC", "http://localhost:8000/redfish/v1/")
    
    # Check nodes
    nodes = get_ironic_nodes()
    click.echo(f"\nNodes: {len(nodes)}")
    for node in nodes:
        click.echo(f"  • {node['name']}: {node['provision_state']}")

Acceptance Criteria

  • Shows container status
  • Shows health status
  • Shows endpoint accessibility
  • Shows enrolled nodes
  • Supports --json output

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions