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

Refactoring/gcp/gce #319

Merged
merged 46 commits into from
Apr 12, 2019
Merged

Refactoring/gcp/gce #319

merged 46 commits into from
Apr 12, 2019

Conversation

Remi05
Copy link
Contributor

@Remi05 Remi05 commented Apr 9, 2019

Migrated Google Compute Engine to the new architecture. Also adds support for filtering GCE Instances by Zone and GCE Subnetworks by Region.

@codecov-io
Copy link

codecov-io commented Apr 9, 2019

Codecov Report

Merging #319 into develop will increase coverage by 0.23%.
The diff coverage is 28.3%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #319      +/-   ##
===========================================
+ Coverage    33.83%   34.06%   +0.23%     
===========================================
  Files          179      189      +10     
  Lines         6071     6246     +175     
===========================================
+ Hits          2054     2128      +74     
- Misses        4017     4118     +101
Impacted Files Coverage Δ
ScoutSuite/providers/gcp/resources/resources.py 44.44% <ø> (ø) ⬆️
ScoutSuite/providers/gcp/provider.py 12.19% <0%> (-0.63%) ⬇️
...coutSuite/providers/gcp/resources/gce/firewalls.py 14.89% <14.89%> (ø)
...utSuite/providers/gcp/resources/gce/subnetworks.py 21.73% <21.73%> (ø)
...coutSuite/providers/gcp/resources/gce/instances.py 26% <26%> (ø)
ScoutSuite/providers/gcp/facade/gce.py 26.66% <26.66%> (ø)
ScoutSuite/providers/gcp/resources/gce/networks.py 26.92% <26.92%> (ø)
...coutSuite/providers/gcp/resources/gce/snapshots.py 29.16% <29.16%> (ø)
ScoutSuite/providers/gcp/resources/gce/disks.py 33.33% <33.33%> (ø)
...uite/providers/gcp/resources/gce/instance_disks.py 36.36% <36.36%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 972de88...0afb7a1. Read the comment docs.

@misg misg requested review from x4v13r64, Aboisier and misg April 9, 2019 16:36
Copy link
Contributor

@Aboisier Aboisier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yayy

EDIT: well as long as you make sure everything works after merging with dev.

@Aboisier
Copy link
Contributor

I'm also wondering if the Regions and Zones classes you defined couldn't be moved "up" (to providers/gcp/resources/, at the same level than GCPCompositeResources) in order to be "abstract" (like AWS Regions and VPCs) and be used for potential other GCP services. What do you think @Aboisier ?

Yup, looks like that would make sense! Ì haven't worked with GCP enough to know if there are other services which use regions. I'm guessing there are.

@Remi05
Copy link
Contributor Author

Remi05 commented Apr 11, 2019

I'm also wondering if the Regions and Zones classes you defined couldn't be moved "up" (to providers/gcp/resources/, at the same level than GCPCompositeResources) in order to be "abstract" (like AWS Regions and VPCs) and be used for potential other GCP services. What do you think @Aboisier ?

Yup, looks like that would make sense! Ì haven't worked with GCP enough to know if there are other services which use regions. I'm guessing there are.

I tried to do that at first but it caused a lot of issues, it's a bit different than AWS' VPC and Region. Anyway, the Regions and Zones are currently only used in GCE's API (to fetch regions and zones, we use the Compute Engine client).

@Aboisier Aboisier self-requested a review April 11, 2019 03:15
@Remi05 Remi05 merged commit 4c8e4f6 into develop Apr 12, 2019
@Remi05 Remi05 deleted the refactoring/gcp/gce branch April 12, 2019 06:25
@Aboisier Aboisier mentioned this pull request Apr 12, 2019
53 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-provider-gcp Affects GCP provider enhancement New feature or request providers-refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants