-
Notifications
You must be signed in to change notification settings - Fork 88
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
Refactor #111
Refactor #111
Conversation
Signed-off-by: Theo Giovanna <gtheo@google.com>
* Switch import from classes to modules Signed-off-by: Theo Giovanna <gtheo@google.com> * Switch from aws/gcp_internal to internal Signed-off-by: Theo Giovanna <gtheo@google.com> * Fix identation Signed-off-by: Theo Giovanna <gtheo@google.com> * Fix most cyclic dependencies * More import fix Signed-off-by: Theo Giovanna <gtheo@google.com> Co-authored-by: Thomas Chopitea <tomchop@gmail.com>
Signed-off-by: Theo Giovanna <gtheo@google.com>
* Initial refactor proposal (google#93) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove forensics interface (google#100) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove duplicate code Signed-off-by: Theo Giovanna <gtheo@google.com>
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Merging, pending:
|
* Initial refactor proposal (#93) Signed-off-by: Theo Giovanna <gtheo@google.com> * Switch import from classes to modules (#96) * Switch import from classes to modules Signed-off-by: Theo Giovanna <gtheo@google.com> * Switch from aws/gcp_internal to internal Signed-off-by: Theo Giovanna <gtheo@google.com> * Fix identation Signed-off-by: Theo Giovanna <gtheo@google.com> * Fix most cyclic dependencies * More import fix Signed-off-by: Theo Giovanna <gtheo@google.com> Co-authored-by: Thomas Chopitea <tomchop@gmail.com> * Remove forensics interface (#100) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove duplicate code (#101) * Initial refactor proposal (#93) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove forensics interface (#100) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove duplicate code Signed-off-by: Theo Giovanna <gtheo@google.com> * Add pagination method for AWS (#110) Signed-off-by: Theo Giovanna <gtheo@google.com> * Refactor internal GCP module (#111) * Initial refactor proposal (#93) Signed-off-by: Theo Giovanna <gtheo@google.com> * Switch import from classes to modules (#96) * Switch import from classes to modules Signed-off-by: Theo Giovanna <gtheo@google.com> * Switch from aws/gcp_internal to internal Signed-off-by: Theo Giovanna <gtheo@google.com> * Fix identation Signed-off-by: Theo Giovanna <gtheo@google.com> * Fix most cyclic dependencies * More import fix Signed-off-by: Theo Giovanna <gtheo@google.com> Co-authored-by: Thomas Chopitea <tomchop@gmail.com> * Remove forensics interface (#100) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove duplicate code (#101) * Initial refactor proposal (#93) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove forensics interface (#100) Signed-off-by: Theo Giovanna <gtheo@google.com> * Remove duplicate code Signed-off-by: Theo Giovanna <gtheo@google.com> * refactoring gcp Co-authored-by: Theo <gtheo@google.com> Co-authored-by: Thomas Chopitea <tomchop@gmail.com> * Fix gcp unit and e2e tests (#112) * Fix gcp unit and e2e tests Signed-off-by: Theo Giovanna <gtheo@google.com> * Fix docstrings Signed-off-by: Theo Giovanna <gtheo@google.com> * Add Paginate method for GCP (#113) * Fix #80 Signed-off-by: Theo Giovanna <gtheo@google.com> * Some docstring fixes Signed-off-by: Theo Giovanna <gtheo@google.com> * Address comments Signed-off-by: Theo Giovanna <gtheo@google.com> * Update docstring Signed-off-by: Theo Giovanna <gtheo@google.com> * Rename ExecuteAndPaginate to ExecuteRequest (#114) Signed-off-by: Theo Giovanna <gtheo@google.com> * Some docstring fixes Signed-off-by: Theo Giovanna <gtheo@google.com> Co-authored-by: Thomas Chopitea <tomchop@gmail.com> Co-authored-by: Said Eid <46205691+sa3eed3ed@users.noreply.github.com>
Refactoring GCP.
Splitting project services to different modules (ex: Build, Compute, Function).
Splitting Compute into:
compute.py -> compute-wide operation
compute_resources.py -> compute resources definition (image, instance, disk, etc..)
EX:
import libcloudforensics.providers.gcp.internal.project as project
import libcloudforensics.providers.gcp.internal.compute_resources as gce
import libcloudforensics.providers.gcp.forensics as forensics
dst_project = project.GoogleCloudProject('PROJECT-ID')
forensics.StartAnalysisVm(
project=dst_project.project_id, vm_name='analysis-vm-test', zone='europe-west4-a',
boot_disk_size=10, boot_disk_type='pd-ssd', cpu_cores=4)