feat: Uploading snapshot to GCS using create_snapshot.py (#81)
feat: Uploading snapshot to GCS using create_snapshot.py (#81)

* Added arguments and methods GCS upload

Added Arguments:
--upload-to : name of bucket that should be created or used for uploading snapshot
--service-account-key-file : key file used is gcloud auth activate-service-account

Methods:
upload_preflight(bucket: str): Authenticates as service account, checks if bucket exists using gsutil ls -b gs://BUCKET_NAME, if this fails a bucket of that name is created

upload_file(bucket:str, snap_file: str): uploads file to bucket

run_gsutil_cmd(command: str): Runs gsutil/gcloud commands in a shell environment returning the return code of the command and the output (stdout/stderr)

* Fixed linting issues

* Linting fixes

* linting fixes

* fixed error handeling

* More linting fixes, flake8 is using python 2

* ignore function argument typing

Co-authored-by: Shabir Mohamed Abdul Samadh <73796fb16f01652293c5e9985e404060789c5810@users.noreply.github.com>
GoogleCloudPlatform/anthos-samples,GoogleCloudPlatform/anthos-samples,GoogleCloudPlatform/anthos-samples,GoogleCloudPlatform/anthos-samples