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

fix :#1218, #1152 - refactor EC2 network interface, private ip #1219

Merged
merged 10 commits into from
Sep 20, 2023

Conversation

achantavy
Copy link
Contributor

@achantavy achantavy commented Jul 17, 2023

Refactors EC2 Network Interfaces and Private IPs to the cartography data model. Fixes #1152 since the data model includes automatic cleanup jobs.

@achantavy achantavy changed the title refactor: #1218, fix: #1152 fix :#1218, fix: #1152 - refactor EC2 network interface, private ip Jul 17, 2023
@achantavy achantavy changed the title fix :#1218, fix: #1152 - refactor EC2 network interface, private ip fix :#1218, #1152 - refactor EC2 network interface, private ip Jul 17, 2023
@achantavy achantavy linked an issue Jul 17, 2023 that may be closed by this pull request
Comment on lines +84 to +85
if network_interface.get('PrivateIpAddresses'):
for private_ip_address in network_interface['PrivateIpAddresses']:
Copy link
Contributor

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

Suggested change
if network_interface.get('PrivateIpAddresses'):
for private_ip_address in network_interface['PrivateIpAddresses']:
for private_ip_address in network_interface.get('PrivateIpAddresses', []):

cartography/models/aws/ec2/networkinterfaces.py Outdated Show resolved Hide resolved
Comment on lines 33 to 38
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')
Copy link
Contributor

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

@achantavy achantavy merged commit 1d81839 into master Sep 20, 2023
5 checks passed
@achantavy achantavy deleted the refactornetworkinterfaces branch September 20, 2023 17:41
chandanchowdhury pushed a commit to juju4/cartography that referenced this pull request Jun 26, 2024
lyft#1219)

Refactors EC2 Network Interfaces and Private IPs to the cartography data
model. Fixes lyft#1152 since the data model includes automatic cleanup jobs.

- Uses same technique as lyft#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants