-
Notifications
You must be signed in to change notification settings - Fork 340
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
fix :#1218, #1152 - refactor EC2 network interface, private ip #1219
Conversation
bac1e91
to
5875244
Compare
4accca8
to
1426cff
Compare
if network_interface.get('PrivateIpAddresses'): | ||
for private_ip_address in network_interface['PrivateIpAddresses']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non blocker: chane this to
if network_interface.get('PrivateIpAddresses'): | |
for private_ip_address in network_interface['PrivateIpAddresses']: | |
for private_ip_address in network_interface.get('PrivateIpAddresses', []): |
interface_type: PropertyRef = PropertyRef('InterfaceType') | ||
public_ip: PropertyRef = PropertyRef('PublicIp') | ||
requester_id: PropertyRef = PropertyRef('RequesterId') | ||
requester_managed: PropertyRef = PropertyRef('RequesterManaged') | ||
source_dest_check: PropertyRef = PropertyRef('SourceDestCheck') | ||
subnetid: PropertyRef = PropertyRef('SubnetId') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra indexes for public_ip, subnet_id, and maybe requester_id
…ork interface, private ip (cartography-cncf#1219) Refactors EC2 Network Interfaces and Private IPs to the cartography data model. Fixes cartography-cncf#1152 since the data model includes automatic cleanup jobs. - Uses same technique as cartography-cncf#1214 to represent Network Interfaces as known by EC2 instances vs Network Interfaces known by describe-network-interfaces. - Also clearly marks that the Private IPs ingested here are known by Network Interfaces and not another source.
mac_address: PropertyRef = PropertyRef('MacAddress', extra_index=True) | ||
description: PropertyRef = PropertyRef('Description') | ||
private_dns_name: PropertyRef = PropertyRef('PrivateDnsName', extra_index=True) | ||
private_ip_address: PropertyRef = PropertyRef('PrivateIpAddress', extra_index=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@serge-wq - [comment 1 of 2] here's an example of what we were talking about earlier: a network interface as known by an EC2 instance has a private_ip_address...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually never mind, wait let me find a better example
Refactors EC2 Network Interfaces and Private IPs to the cartography data model. Fixes #1152 since the data model includes automatic cleanup jobs.