aboutsummaryrefslogtreecommitdiffstats
path: root/functest/api/urls.py
AgeCommit message (Collapse)AuthorFilesLines
2017-08-25Merge "Create API to get log for each task"Morgan Richomme1-1/+5
2017-08-25Create API to update hosts infoLinda Wang1-2/+3
API: /api/v1/functest/envs/action METHOD: POST PARAMS: { "action": "update_hosts", "args": { "identity.ac.dz.com": "8.20.11.22", "image.ac.dz.com": "8.20.11.22" } } JIRA: FUNCTEST-856 Change-Id: Ifaf064110ade6e39189dd14b38c921d9e1c3568d Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-25Create API to get log for each taskLinda Wang1-1/+5
API: /api/v1/functest/tasks/<task_id>/log METHOD: GET JIRA: FUNCTEST-867 Change-Id: I987cbf662e4da349bf7583e48da5d981a2f1e0fd Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-21Merge "Create API to update openrc"Linda Wang1-0/+4
2017-08-21Create API to run a test caseLinda Wang1-1/+11
Two APIs are created here: 1. Run a test case 2. Get the result of the task id JIRA: FUNCTEST-853 Change-Id: I12950933b143b82fb6aeb186ea1b35ddd16e6097 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-18Create API to update openrcLinda Wang1-0/+4
API: /api/v1/functest/openstack/action METHOD: POST PARAMS: { "action": "update_openrc", "args": { "openrc": { "OS_AUTH_URL": "http://192.168.30.222:5000/v3", "OS_IDENTITY_API_VERSION": "3", "OS_IMAGE_API_VERSION": "2", "OS_PASSWORD": "console", "OS_PROJECT_DOMAIN_NAME": "default", "OS_PROJECT_NAME": "admin", "OS_TENANT_NAME": "admin", "OS_USERNAME": "admin", "OS_USER_DOMAIN_NAME": "default" } } } JIRA: FUNCTEST-855 Change-Id: I7c935483c264f2b1b47239684392c8a37dc23d26 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-17API proposal for functestLinda Wang1-0/+52
1. Propose a basic framework for API 2. And these functions have been realized: 1) Show environment 2) Prepare Environment 3) Show credentials 4) List all testcases 5) Show a testcase 6) List all tiers 7) Show a tier 8) List all testcases within given tier JIRA: FUNCTEST-843 Change-Id: Ib961446708077b56465eda0052f6d38806b62594 Signed-off-by: Linda Wang <wangwulin@huawei.com>
Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#include <linux/sysctl.h>
#include <linux/slab.h>
#include <net/net_namespace.h>
#include <net/xfrm.h>

static void __net_init __xfrm_sysctl_init(struct net *net)
{
	net->xfrm.sysctl_aevent_etime = XFRM_AE_ETIME;
	net->xfrm.sysctl_aevent_rseqth = XFRM_AE_SEQT_SIZE;
	net->xfrm.sysctl_larval_drop = 1;
	net->xfrm.sysctl_acq_expires = 30;
}

#ifdef CONFIG_SYSCTL
static struct ctl_table xfrm_table[] = {
	{
		.procname	= "xfrm_aevent_etime",
		.maxlen		= sizeof(u32),
		.mode		= 0644,
		.proc_handler	= proc_dointvec
	},
	{
		.procname	= "xfrm_aevent_rseqth",
		.maxlen		= sizeof(u32),
		.mode		= 0644,
		.proc_handler	= proc_dointvec
	},
	{
		.procname	= "xfrm_larval_drop",
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec
	},
	{
		.procname	= "xfrm_acq_expires",
		.maxlen		= sizeof(int),
		.mode		= 0644,
		.proc_handler	= proc_dointvec
	},
	{}
};

int __net_init xfrm_sysctl_init(struct net *net)
{
	struct ctl_table *table;

	__xfrm_sysctl_init(net);

	table = kmemdup(xfrm_table, sizeof(xfrm_table), GFP_KERNEL);
	if (!table)
		goto out_kmemdup;
	table[0].data = &net->xfrm.sysctl_aevent_etime;
	table[1].data = &net->xfrm.sysctl_aevent_rseqth;
	table[2].data = &net->xfrm.sysctl_larval_drop;
	table[3].data = &net->xfrm.sysctl_acq_expires;

	/* Don't export sysctls to unprivileged users */
	if (net->user_ns != &init_user_ns)
		table[0].procname = NULL;

	net->xfrm.sysctl_hdr = register_net_sysctl(net, "net/core", table);
	if (!net->xfrm.sysctl_hdr)
		goto out_register;
	return 0;

out_register:
	kfree(table);
out_kmemdup:
	return -ENOMEM;
}

void __net_exit xfrm_sysctl_fini(struct net *net)
{
	struct ctl_table *table;

	table = net->xfrm.sysctl_hdr->ctl_table_arg;
	unregister_net_sysctl_table(net->xfrm.sysctl_hdr);
	kfree(table);
}
#else
int __net_init xfrm_sysctl_init(struct net *net)
{
	__xfrm_sysctl_init(net);
	return 0;
}
#endif