/* This file is part of Eclat.
Copyright (C) 2013-2018 Sergey Poznyakoff.
Eclat is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
Eclat is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Eclat. If not, see . */
#include
static char *ami;
static char *instance_count = "1";
static struct grecs_list *secgrp, *devmap, *iface, *privip;
static char *keypair;
static char *user_data;
static char *type;
static char *zone;
static char *kernel;
static char *ramdisk;
static char *shutdown_behavior;
static char *placement_group;
static char *tenancy;
static char *subnet;
static char *private_ip;
static char *secipcount;
static char *profile_name;
static int monitor;
static int disable_term;
static int ebs_opt;
ECLAT_CL_BEGIN([],
[])
OPTION(,n,[],
[])
BEGIN
/* FIXME: check if it's a valid number */
instance_count = optarg;
END
OPTION(security-group,g,[],
[])
BEGIN
if (!secgrp)
secgrp = grecs_list_create();
grecs_list_append(secgrp, optarg);
END
OPTION(keypair,k,[],
[])
BEGIN
keypair = optarg;
END
OPTION(data,d,[],
[])
BEGIN
user_data = optarg;
END
OPTION(data-file,f,[],
[])
BEGIN
user_data = read_file(optarg);
END
OPTION(type,t,[],
[])
ALIAS(instance-type)
BEGIN
type = optarg;
END
OPTION(zone,z,[],
[])
ALIAS(availability-zone)
BEGIN
zone = optarg;
END
OPTION(kernel,,[],
[