From 8cc60697f4abd828c2324e867ec801fb6afec755 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Fri, 12 Jan 2018 16:02:47 +0100 Subject: [PATCH] Update aws-snippets Signed-off-by: Andreas Gerler --- .../aws-snippets-autoloads.el | 29 +++++++ .../aws-snippets-pkg.el | 3 + .../aws-snippets-20180111.001/aws-snippets.el | 77 +++++++++++++++++++ .../snippets/eshell-mode/ami-ls | 5 ++ ...s-autoscaling-describe-auto-scaling-groups | 5 ++ .../eshell-mode/aws-ec2-get-instances | 5 ++ .../eshell-mode/aws-ec2-get-snapshots | 5 ++ .../snippets/eshell-mode/aws-filters | 5 ++ .../snippets/shell-mode/.yas-parents | 1 + snippets/eshell-mode/ami-ls | 5 -- ...s-autoscaling-describe-auto-scaling-groups | 5 -- snippets/eshell-mode/aws-ec2-get-instances | 5 -- snippets/eshell-mode/aws-ec2-get-snapshots | 5 -- snippets/eshell-mode/aws-filters | 5 -- 14 files changed, 135 insertions(+), 25 deletions(-) create mode 100644 elpa/aws-snippets-20180111.001/aws-snippets-autoloads.el create mode 100644 elpa/aws-snippets-20180111.001/aws-snippets-pkg.el create mode 100644 elpa/aws-snippets-20180111.001/aws-snippets.el create mode 100644 elpa/aws-snippets-20180111.001/snippets/eshell-mode/ami-ls create mode 100644 elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups create mode 100644 elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-instances create mode 100644 elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-snapshots create mode 100644 elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-filters create mode 100644 elpa/aws-snippets-20180111.001/snippets/shell-mode/.yas-parents delete mode 100644 snippets/eshell-mode/ami-ls delete mode 100644 snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups delete mode 100644 snippets/eshell-mode/aws-ec2-get-instances delete mode 100644 snippets/eshell-mode/aws-ec2-get-snapshots delete mode 100644 snippets/eshell-mode/aws-filters diff --git a/elpa/aws-snippets-20180111.001/aws-snippets-autoloads.el b/elpa/aws-snippets-20180111.001/aws-snippets-autoloads.el new file mode 100644 index 00000000..26b0e807 --- /dev/null +++ b/elpa/aws-snippets-20180111.001/aws-snippets-autoloads.el @@ -0,0 +1,29 @@ +;;; aws-snippets-autoloads.el --- automatically extracted autoloads +;; +;;; Code: +(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) + +;;;### (autoloads nil "aws-snippets" "aws-snippets.el" (23126 10835 +;;;;;; 780604 640000)) +;;; Generated autoloads from aws-snippets.el + +(autoload 'aws-snippets-initialize "aws-snippets" "\ + + +\(fn)" nil nil) + +(eval-after-load 'yasnippet '(aws-snippets-initialize)) + +;;;*** + +;;;### (autoloads nil nil ("aws-snippets-pkg.el") (23126 10835 781783 +;;;;;; 534000)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; End: +;;; aws-snippets-autoloads.el ends here diff --git a/elpa/aws-snippets-20180111.001/aws-snippets-pkg.el b/elpa/aws-snippets-20180111.001/aws-snippets-pkg.el new file mode 100644 index 00000000..db005b73 --- /dev/null +++ b/elpa/aws-snippets-20180111.001/aws-snippets-pkg.el @@ -0,0 +1,3 @@ +(define-package "aws-snippets" "0.1.0" + "Yasnippets for AWS" + '((yasnippet "0.8.0"))) diff --git a/elpa/aws-snippets-20180111.001/aws-snippets.el b/elpa/aws-snippets-20180111.001/aws-snippets.el new file mode 100644 index 00000000..8406cdaa --- /dev/null +++ b/elpa/aws-snippets-20180111.001/aws-snippets.el @@ -0,0 +1,77 @@ +;;; aws-snippets.el --- Yasnippets for AWS + +;; Copyright (C) 2018 Andreas Gerler +;; keywords: snippets +;; Version: 0.1.0 +;; Package-Requires: ((yasnippet "0.8.0")) + +;; Permission is hereby granted, free of charge, to any person obtaining +;; a copy of this software and associated documentation files (the +;; "Software"), to deal in the Software without restriction, including +;; without limitation the rights to use, copy, modify, merge, publish, +;; distribute, sublicense, and/or sell copies of the Software, and to +;; permit persons to whom the Software is furnished to do so, subject to +;; the following conditions: + +;; The above copyright notice and this permission notice shall be +;; included in all copies or substantial portions of the Software. + +;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +;;; Code: + +(defvar aws-snippets-dir (file-name-directory (or (buffer-file-name) + load-file-name))) +(defconst aws-snippets--default-regions + '("us-east-1" "eu-west-1" "ap-southeast-1")) + +(defcustom aws-snippets-regions aws-snippets--default-regions + "List of AWS regions for selections." + :type '(choice (string :tag "Region") + (repeat :tag "List of Regions" + (string :tag "Region"))) + :set #'(lambda (symbol new) + (let ((old (and (boundp symbol) + (symbol-value symbol)))) + (set-default symbol new) + )) + :group 'aws-snippets + ) + + +(defconst aws-snippets--default-profiles + '("test" "prod")) + +(defcustom aws-snippets-profiles aws-snippets--default-profiles + "List of AWS profiles for selections." + :type '(choice (string :tag "Profile") + (repeat :tag "List of Profiles" + (string :tag "Profiles"))) + :set #'(lambda (symbol new) + (let ((old (and (boundp symbol) + (symbol-value symbol)))) + (set-default symbol new) + )) + :group 'aws-snippets + ) + +;;;###autoload +(defun aws-snippets-initialize () + (let ((snip-dir (expand-file-name "snippets" aws-snippets-dir))) + (add-to-list 'yas-snippet-dirs snip-dir t) + (yas-load-directory snip-dir))) + +;;;###autoload +(eval-after-load 'yasnippet + '(aws-snippets-initialize)) + +(require 'yasnippet) + +(provide 'aws-snippets) +;;; aws-snippets.el ends here diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/ami-ls b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/ami-ls new file mode 100644 index 00000000..1c363398 --- /dev/null +++ b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/ami-ls @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: ami-ls +# key: ami-ls +# -- +aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(message "{")(message "("))` aws --profile=$1 ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(message "}")(message ")"))` --query "reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 \ No newline at end of file diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups new file mode 100644 index 00000000..d9c19e95 --- /dev/null +++ b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: aws-autoscaling-describe-auto-scaling-groups +# key: asg-ls +# -- +aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 \ No newline at end of file diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-instances b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-instances new file mode 100644 index 00000000..1314c89f --- /dev/null +++ b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-instances @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: aws-ec2-get-instances +# key: ec2-ls +# -- +aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query 'Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(\`,\`,Tags[?Key==\`Schedule\`].Value),InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-snapshots b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-snapshots new file mode 100644 index 00000000..3da8d1dc --- /dev/null +++ b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-snapshots @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: aws-ec2-get-snapshots +# key: snap-ls +# -- +aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --query 'Snapshots[].[join(\`,\`,Tags[?Key==\`Name\`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-filters b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-filters new file mode 100644 index 00000000..9016ee7e --- /dev/null +++ b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-filters @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: aws-filters +# key: awsfil +# -- +--filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "ip-address" "private-ip-address" "network-interface.subnet-id" "description"))},Values=$2" $0 \ No newline at end of file diff --git a/elpa/aws-snippets-20180111.001/snippets/shell-mode/.yas-parents b/elpa/aws-snippets-20180111.001/snippets/shell-mode/.yas-parents new file mode 100644 index 00000000..2de397c8 --- /dev/null +++ b/elpa/aws-snippets-20180111.001/snippets/shell-mode/.yas-parents @@ -0,0 +1 @@ +eshell-mode diff --git a/snippets/eshell-mode/ami-ls b/snippets/eshell-mode/ami-ls deleted file mode 100644 index 2c6ad305..00000000 --- a/snippets/eshell-mode/ami-ls +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: ami-ls -# key: ami-ls -# -- -aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(insert-string "{")(insert-string "("))` aws --profile=$1 ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(insert-string "}")(insert-string ")"))` --query "reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 \ No newline at end of file diff --git a/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups b/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups deleted file mode 100644 index 11b80457..00000000 --- a/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: aws-autoscaling-describe-auto-scaling-groups -# key: aws-autoscaling-describe-auto-scaling-groups -# -- -aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 \ No newline at end of file diff --git a/snippets/eshell-mode/aws-ec2-get-instances b/snippets/eshell-mode/aws-ec2-get-instances deleted file mode 100644 index 16511aee..00000000 --- a/snippets/eshell-mode/aws-ec2-get-instances +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: aws-ec2-get-instances -# key: ec2-ls -# -- -aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-instances --query 'Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(\`,\`,Tags[?Key==\`Schedule\`].Value),InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 diff --git a/snippets/eshell-mode/aws-ec2-get-snapshots b/snippets/eshell-mode/aws-ec2-get-snapshots deleted file mode 100644 index 91cbdaf0..00000000 --- a/snippets/eshell-mode/aws-ec2-get-snapshots +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: aws-ec2-get-snapshots -# key: snap-ls -# -- -aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-snapshots --query 'Snapshots[].[join(`,`,Tags[?Key==`Name`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0 diff --git a/snippets/eshell-mode/aws-filters b/snippets/eshell-mode/aws-filters deleted file mode 100644 index 9ba8ff70..00000000 --- a/snippets/eshell-mode/aws-filters +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: aws-filters -# key: awsfil -# -- ---filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "private-ip-address" "network-interface.subnet-id" "description"))},Values=$2" $0 \ No newline at end of file -- 2.47.3