Discover which nova instance is hosting an address, FQDN, or URL
Given an IP address, hostname, domain name, or URL, resolve to an IP address and use OS_XXX environment variables to connect to Nova and find the instance that address is hosted on.
Blueprint information
- Status:
- Complete
- Approver:
- Caleb Groom
- Priority:
- Medium
- Drafter:
- Ziad Sawalha
- Direction:
- Approved
- Assignee:
- Ziad Sawalha
- Definition:
- Approved
- Series goal:
- Accepted for poc
- Implementation:
- Implemented
- Milestone target:
- poc
- Started by
- Ziad Sawalha
- Completed by
- Caleb Groom
Related branches
Related bugs
Sprints
Whiteboard
(zns):
- Use python-
- Document CLI and python usage
- Document sys-admin use case (starting from "pip install satori")
- CLI sample:
$ satori discover www.foo.com
Address:
www.foo.com resolves to IPv4 address 4.4.4.4
Host:
4.4.4.4 (www.foo.com) is hosted on a Nova Instance
Instance Information:
URI: https:/
Name: sampleserver01.
ID: d9119040-
ip-addresses:
public:
4.4.4.4
private:
- python sample:
>>>from satori import discovery
>>>discover.
{... a dict ...}
(cgroom): The CLI example has structured output. You could also just print the dict if the keys have sane names. I don't think there's a need right now to make the output formatted.
(zns): Since this is not final code (no tests, etc) and a dict would not have any ordering, I opted for structured formatting to demonstrate the sequence that the discovery took place in (host resolved, the nova API called). The aim is to easily demonstrate what Satori is doing. Would writing that out be more instructive? Like "Step 1 - hostname resolution..." etc...
(cgroom): That makes sense. Keep the structured text.