bonclay7 / aws-amicleaner

Cleanup your old unused ami and related snapshots
MIT License
362 stars 132 forks source link

Delete orphaned snapshots #22

Closed bonclay7 closed 8 years ago

bonclay7 commented 8 years ago

Work in progres on #19

codecov-io commented 8 years ago

Current coverage is 91.07% (diff: 87.64%)

Merging #22 into master will increase coverage by 3.98%

@@             master        #22   diff @@
==========================================
  Files             5          8     +3   
  Lines           550        639    +89   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            479        582   +103   
+ Misses           71         57    -14   
  Partials          0          0          

Powered by Codecov. Last update 864a15e...a3972f8

bonclay7 commented 8 years ago
amicleaner/cli.py --full-report --mapping-key name --mapping-values test_mobile --keep-previous 0                                                                                                             [ruby-2.2.1]
+------------------+
| Orphan Snapshots |
+------------------+
|  snap-60155659   |
|  snap-41738886   |
|  snap-51041a73   |
|  snap-0610ba23   |
|  snap-9a13ebb8   |
|  snap-8eb5e0ac   |
+------------------+
Do you want to continue and remove 6 orphan snapshots [y/N] ? : n

Default values : ==>
mapping_key : name
mapping_values : ['test_mobile']
keep_previous : 0

Retrieving AMIs to clean ...
limbo_mobile
+--------------+------------------------------------+--------------------------+
|    AMI ID    |              AMI Name              |      Creation Date       |
+--------------+------------------------------------+--------------------------+
| ami-094b0969 |  test_mobile-demo-hvm-201608180941 | 2016-08-18T09:51:51.000Z |
+--------------+------------------------------------+--------------------------+

AMIs to be removed:
+--------------+------------+
|  Group name  | candidates |
+--------------+------------+
|  test_mobile |     1      |
+--------------+------------+
Do you want to continue and remove 1 AMIs [y/N] ? : n