[cs615asa] [git commit] CS615 EBS-BACKUP; backup a directory into Elastic Block Storage (EBS) branch main updated. 5fe2c86849d21c5b80d99c34baf62d472a7d5ec5

Git Owner jschauma at stevens.edu
Sun May 9 18:31:05 EDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CS615 EBS-BACKUP; backup a directory into Elastic Block Storage (EBS)".

The branch, main has been updated
       via  5fe2c86849d21c5b80d99c34baf62d472a7d5ec5 (commit)
      from  b1d07c6287b8e157e2a495af2d72a773d56c6d96 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5fe2c86849d21c5b80d99c34baf62d472a7d5ec5
Author: ngoldstein51 <ngoldstein51 at gmail.com>
Date:   Sun May 9 18:24:19 2021 -0400

    removed -i argument used in development

diff --git a/src/argument_parsing.py b/src/argument_parsing.py
index e482245..a41c503 100644
--- a/src/argument_parsing.py
+++ b/src/argument_parsing.py
@@ -11,8 +11,6 @@ This module identifies four command-line options:
 This module also identifies one mandatory argument:
     dir           The directory to backup.
 
-Todo:
-    * Remove -i option when done with development
 """
 
 import argparse
@@ -42,14 +40,6 @@ def parse_args(args):
       help='Use the given volume instead of creating a new one.',
   )
 
-  parser.add_argument(
-      '-i',
-      metavar='instance-id',
-      type=str,
-      help='FOR DEBUGGING PURPOSES: Use this existing ec2 instance rather than creating a new one. \
-           If set, will not shutdown/terminate afterwards.',
-  )
-
   parser.add_argument(
       "dir",
       help="Directory to backup",
diff --git a/src/main.py b/src/main.py
index 6509d54..7ea7dea 100644
--- a/src/main.py
+++ b/src/main.py
@@ -142,18 +142,13 @@ def backup(args):
     try:
         size = calculate_dir_size(args.dir)
 
-        if args.i is None:
-            # 1. create ec2 ...
-            ec2 = EC2(session, {
-                'zone_id': ZONE + 'a',
-            })
-            # If the EC2 instance gets created let's be sure to cleanup
-            # regardless of manner of exit
-            atexit.register(exit(ec2))
-        else:
-            ec2 = EC2(session, {
-                'instance_id': args.i,
-            })
+        # 1. create ec2 ...
+        ec2 = EC2(session, {
+            'zone_id': ZONE + 'a',
+        })
+        # If the EC2 instance gets created let's be sure to cleanup
+        # regardless of manner of exit
+        atexit.register(exit(ec2))
 
         # 2. volume [creation] attachment ...
 

-----------------------------------------------------------------------

Summary of changes:
 src/argument_parsing.py | 10 ----------
 src/main.py             | 19 +++++++------------
 2 files changed, 7 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
CS615 EBS-BACKUP; backup a directory into Elastic Block Storage (EBS)


More information about the cs615asa mailing list