astakos: Split im/functions.py

Split `im/functions.py` in two parts. Rename the first part as
`user_utils.py` and keep in it all user-related utilities that
`im/functions.py` provided (mainly mail utilities). The second part is
the project-related functions, which will be kept in `im/functions.py`
for now.

Also, fix any broken imports that this split introduces.
astakos: Allow sending customizable emails

Add a `send_plain` function in `im/user_utils.py`. With the `send_plain`
function, the admin can send a fully customizable mail to an
AstakosUser. The admin can either choose to use the provided body
template (`plain_email.txt`) and subject, or write his/her own.
astakos: Add project logic

Add a `validate_project_action` function that takes a project and
an action as arguments and checks if the action can be applied on the
project.
astakos: Add user logic

Add a `user_logic` file that serves as a common endpoint for actions on
users. The actions that this file offers act as a wrapper above
`activation_backends` and are used by `snf_manage` and `im` views.

Also, add a `validate_user_action` function in `activation_backends`, in
order to export this user logic to any other module that wants to use
it.
astakos: Add tests for user_logic

Add tests under `im` that verify that the functions in `user_logic.py`
are working as intended.
astakos: Add tests for management commands

Add tests for the following management commands: user-modify,
user-activation-send.
Merge branch 'feature-astakos-logic2' of https://github.com/apyrgio/synnefo into develop

This PR adds several logic functions in astakos, to handle/validate actions on
AstakosUsers/Projects. Moreover, it moves the user-related functions away from
the im/functions.py file and adds them in a user_utils.py file.

Finally, this PR adds tests for the user logic functions, as well as a function
to send fully customizable mails to users. All the above have been created in
order to pave the way for the integration of the admin tool.
cyclades: Update help msgs on snf-manage commands

* Print the default value of --wait option in snf-manage help of:
    - port-create
    - port-remove
    - server-create
    - server-modify
    - server-remove
cyclades: Update argument names of snf-manage cmds

* Update various snf-manage commands to use "--user" instead of
"--owner/--userid/--user-id"
* Update server-create and server-import to use --flavor instead of
--flavor-id
* Update server-create and server-import to use --image instead of
--image-id
* Update subnet-create to use --network instead of --network-id
docs: Update docs to comply with previous commit

* Update docs and Changelog to reflect changes introduced in the
previous commit.
burnin: Test cross-container object move (pithos)

Refs #108
deploy: Faster template generation

Instead of massedit.edit_files() which takes a file pattern and
walks the given directory (/tmp in our case) to find matching files,
use editor.edit_file() which takes only the file to be customized as
argument.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
cyclades: Fix backend logic wrt ConnectNetwork

Since Ganeti 2.10, networks are connected to nodegroups with mode,
link and vlan info.

As a result group_list in GetNetwork() response include four fields
per group and not three. Fix reconciliation to be aware of it.

Additionally the OpNetworkConnect() takes an extra parameter;
network_vlan. This currently is not optional. Therefore let
ConnectNetwork() RAPI method pass an empty string as vlan info.

This will change as soon as synnefo will support private networks on
top of openvswitch.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>