summaryrefslogtreecommitdiffabout
path: root/src/mkinst.c
Side-by-side diff
Diffstat (limited to 'src/mkinst.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/mkinst.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/mkinst.c b/src/mkinst.c
index cea7680..eb74acd 100644
--- a/src/mkinst.c
+++ b/src/mkinst.c
@@ -35,7 +35,7 @@
either sip-count or sips can be specified, but not both.
*/
void
-add_iface(struct ec2_query *q, int ifno, char *ifspec)
+add_iface(struct ec2_request *q, int ifno, char *ifspec)
{
struct wordsplit ws;
char *bufptr = NULL;
@@ -62,7 +62,7 @@ add_iface(struct ec2_query *q, int ifno, char *ifspec)
"NetworkInterface.%d."
"PrivateIpAddresses.%d.PrivateIpAddress",
ifno, i);
- eclat_query_add_param(q, bufptr, p);
+ eclat_request_add_param(q, bufptr, p);
}
/* fall through */
case 7:
@@ -71,7 +71,7 @@ add_iface(struct ec2_query *q, int ifno, char *ifspec)
"NetworkInterface.%d."
"SecondaryPrivateIpAddressCount",
ifno);
- eclat_query_add_param(q, bufptr, ws.ws_wordv[6]);
+ eclat_request_add_param(q, bufptr, ws.ws_wordv[6]);
}
case 6:
if (ws.ws_wordv[5][0]) {
@@ -79,7 +79,7 @@ add_iface(struct ec2_query *q, int ifno, char *ifspec)
"NetworkInterface.%d."
"DeleteOnTermination",
ifno);
- eclat_query_add_param(q, bufptr, ws.ws_wordv[5]);
+ eclat_request_add_param(q, bufptr, ws.ws_wordv[5]);
}
case 5:
if (ws.ws_wordv[4])
@@ -89,21 +89,21 @@ add_iface(struct ec2_query *q, int ifno, char *ifspec)
"NetworkInterface.%d."
"SecurityGroupId.%d",
ifno, i);
- eclat_query_add_param(q, bufptr, p);
+ eclat_request_add_param(q, bufptr, p);
}
case 4:
if (ws.ws_wordv[3]) {
grecs_asprintf(&bufptr, &bufsize,
"NetworkInterface.%d.PrivateIpAddress",
ifno);
- eclat_query_add_param(q, bufptr, ws.ws_wordv[3]);
+ eclat_request_add_param(q, bufptr, ws.ws_wordv[3]);
}
case 3:
if (ws.ws_wordv[2]) {
grecs_asprintf(&bufptr, &bufsize,
"NetworkInterface.%d.Description",
ifno);
- eclat_query_add_param(q, bufptr, ws.ws_wordv[2]);
+ eclat_request_add_param(q, bufptr, ws.ws_wordv[2]);
}
case 2:
if (!ws.ws_wordv[1][0])
@@ -113,14 +113,14 @@ add_iface(struct ec2_query *q, int ifno, char *ifspec)
}
grecs_asprintf(&bufptr, &bufsize, "NetworkInterface.%d.SubnetId",
ifno);
- eclat_query_add_param(q, bufptr,
+ eclat_request_add_param(q, bufptr,
ws.ws_wordv[1][0] ? ws.ws_wordv[1] : "0");
if (ws.ws_wordv[0][0]) {
grecs_asprintf(&bufptr, &bufsize,
"NetworkInterface.%d.DeviceIndex",
ifno);
- eclat_query_add_param(q, bufptr, ws.ws_wordv[0]);
+ eclat_request_add_param(q, bufptr, ws.ws_wordv[0]);
}
wordsplit_free(&ws);
@@ -134,68 +134,68 @@ eclat_run_instances(eclat_command_env_t *env, int argc, char **argv)
char *bufptr = NULL;
size_t bufsize = 0;
struct grecs_list_entry *ep;
- struct ec2_query *q = env->query;
+ struct ec2_request *q = env->request;
char *p;
int iface_no = 1;
parse_options(env, argc, argv);
- eclat_query_add_param(q, "ImageId", ami);
+ eclat_request_add_param(q, "ImageId", ami);
p = strchr(instance_count, '-');
- eclat_query_add_param(q, "MinCount", instance_count);
+ eclat_request_add_param(q, "MinCount", instance_count);
if (p) {
*p++ = 0;
- eclat_query_add_param(q, "MaxCount", p);
+ eclat_request_add_param(q, "MaxCount", p);
} else
- eclat_query_add_param(q, "MaxCount", instance_count);
+ eclat_request_add_param(q, "MaxCount", instance_count);
if (keypair)
- eclat_query_add_param(q, "KeyName", keypair);
+ eclat_request_add_param(q, "KeyName", keypair);
if (secgrp) {
for (i = 1, ep = secgrp->head; ep; ep = ep->next, i++) {
grecs_asprintf(&bufptr, &bufsize,
"SecurityGroup.%d", i);
- eclat_query_add_param(q, bufptr, ep->data);
+ eclat_request_add_param(q, bufptr, ep->data);
}
}
if (type)
- eclat_query_add_param(q, "InstanceType", type);
+ eclat_request_add_param(q, "InstanceType", type);
if (zone)
- eclat_query_add_param(q, "Placement.AvailabilityZone", zone);
+ eclat_request_add_param(q, "Placement.AvailabilityZone", zone);
if (kernel)
- eclat_query_add_param(q, "KernelId", kernel);
+ eclat_request_add_param(q, "KernelId", kernel);
if (ramdisk)
- eclat_query_add_param(q, "RamdiskId", ramdisk);
+ eclat_request_add_param(q, "RamdiskId", ramdisk);
if (devmap)
eclat_encode_devmap(q, devmap);
if (monitor)
- eclat_query_add_param(q, "Monitoring.Enabled", "true");
+ eclat_request_add_param(q, "Monitoring.Enabled", "true");
if (disable_term)
- eclat_query_add_param(q, "DisableApiTermination", "true");
+ eclat_request_add_param(q, "DisableApiTermination", "true");
if (shutdown_behavior)
- eclat_query_add_param(q, "InstanceInitiatedShutdownBehavior",
+ eclat_request_add_param(q, "InstanceInitiatedShutdownBehavior",
"true");
if (placement_group)
- eclat_query_add_param(q, "Placement.GroupName",
+ eclat_request_add_param(q, "Placement.GroupName",
placement_group);
if (tenancy)
- eclat_query_add_param(q, "Placement.Tenancy", tenancy);
+ eclat_request_add_param(q, "Placement.Tenancy", tenancy);
if (subnet)
- eclat_query_add_param(q, "SubnetId", subnet);
+ eclat_request_add_param(q, "SubnetId", subnet);
if (private_ip)
- eclat_query_add_param(q, "PrivateIpAddress", private_ip);
+ eclat_request_add_param(q, "PrivateIpAddress", private_ip);
/* FIXME: I'm not at all sure whether this is the right way of
doing it. */
@@ -205,11 +205,11 @@ eclat_run_instances(eclat_command_env_t *env, int argc, char **argv)
"NetworkInterface.1."
"PrivateIpAddresses.%d.PrivateIpAddress",
i);
- eclat_query_add_param(q, bufptr, ep->data);
+ eclat_request_add_param(q, bufptr, ep->data);
}
iface_no++;
} else if (secipcount) {
- eclat_query_add_param(q,
+ eclat_request_add_param(q,
"NetworkInterface.1."
"SecondaryPrivateIpAddressCount",
secipcount);
@@ -221,14 +221,14 @@ eclat_run_instances(eclat_command_env_t *env, int argc, char **argv)
add_iface(q, iface_no++, ep->data);
if (profile_name)
- eclat_query_add_param(q,
+ eclat_request_add_param(q,
strncmp(profile_name, "arn:", 4) == 0 ?
"IamInstanceProfile.Arn" :
"IamInstanceProfile.Name",
profile_name);
if (ebs_opt)
- eclat_query_add_param(q, "EbsOptimized", "true");
+ eclat_request_add_param(q, "EbsOptimized", "true");
if (user_data) {
size_t enclen;
@@ -237,7 +237,7 @@ eclat_run_instances(eclat_command_env_t *env, int argc, char **argv)
strlen(user_data),
(unsigned char**) &p, &enclen);
- eclat_query_add_param(q, "UserData", p);
+ eclat_request_add_param(q, "UserData", p);
free(p);
}

Return to:

Send suggestions and report system problems to the System administrator.