Fixing headers across all files

Adding Openstack copyright where it was missing.
In places where both IBM and Openstack appear
IBM appears first

Bonus: Deleting all ansible management files
which are planned to be removed anyway with
the transition to a devstack installation

Change-Id: I49449227cd17ebf6caa848a091c241b1b6430fa5
This commit is contained in:
Eran Rom 2016-12-09 14:17:12 +02:00
parent 1e5bc9afb7
commit 64d6813ff7
97 changed files with 467 additions and 1278 deletions

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright 2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
07-Jan-2016 cdoron Initial implementation.
===========================================================================*/
package org.openstack.storlet.compress;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright 2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
03-Sep-2014 evgenyl Initial implementation.
===========================================================================*/
package org.openstack.storlet.execdep;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright 2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
07-Jul-2015 cdoron Initial implementation.
===========================================================================*/
package org.openstack.storlet.half;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright 2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
22-Sep-2014 eranr Initial implementation.
===========================================================================*/
package org.openstack.storlet.identity;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright 2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright 2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.test;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright 2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright 2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- hosts: storlet-proxy:storlet-storage:docker
roles:

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- hosts: docker
roles:

View File

@ -1,17 +1,19 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
ansible_ssh_user: <ANSIBLE_USER>
repo_root: <STORLETS_REPO_ROOT>
mgmt_group: [ "127.0.0.1" ]

View File

@ -1,33 +0,0 @@
"""-------------------------------------------------------------------------
Copyright (c) 2010-2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------"""
mgmt_vars = [
'docker_device',
'keystone_endpoint_host',
'keystone_admin_url',
'keystone_public_url',
'keystone_admin_token',
'keystone_admin_password',
'swift_public_url',
'swift_endpoint_host',
'storlet_management_account',
'storlet_management_admin_username',
'storlet_manager_admin_password',
'storlet_management_swift_topology_container',
'storlet_management_swift_topology_object',
'base_os_image',
'docker_registry_port',
'storlet_management_install_dir'
]

View File

@ -1,106 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- name: Test if tenant is already created
shell: keystone --os-endpoint={{ keystone_admin_url }} --os-token={{ keystone_admin_token }} tenant-list | grep {{ tenant_name }} | wc -l
register: tenant
- name: Test if user is already created
shell: keystone --os-endpoint={{ keystone_admin_url }} --os-token={{ keystone_admin_token }} user-list | grep {{ user_name }} | wc -l
register: user
- name: create new tenant {{ tenant_name }}
keystone_user:
endpoint: "{{ keystone_admin_url }}"
token: "{{ keystone_admin_token }}"
tenant: "{{ tenant_name }}"
when: "'0' in tenant.stdout_lines[0]"
- name: create new user {{ user_name }} for tenant {{ tenant_name }}
keystone_user:
endpoint: "{{ keystone_admin_url }}"
token: "{{ keystone_admin_token }}"
tenant: "{{ tenant_name }}"
user: "{{ user_name }}"
password: "{{ user_password }}"
when: "'0' in user.stdout_lines[0]"
- name: apply role admin to user {{ user_name }}
keystone_user:
endpoint: "{{ keystone_admin_url }}"
token: "{{ keystone_admin_token }}"
tenant: "{{ tenant_name }}"
user: "{{ user_name }}"
role: admin
when: "'0' in user.stdout_lines[0]"
- name: Set account metadata in swift -- enable storlets
command: swift post
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ user_name }}"
--os-password="{{ user_password }}"
--os-tenant-name="{{ tenant_name }}"
--meta "Storlet-Enabled:True"
- name: put account container log
command: swift post
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ user_name }}"
--os-password="{{ user_password }}"
--os-tenant-name="{{ tenant_name }}"
log
- name: put account container storlet
command: swift post
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ user_name }}"
--os-password="{{ user_password }}"
--os-tenant-name="{{ tenant_name }}"
storlet
- name: put account container dependency
command: swift post
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ user_name }}"
--os-password="{{ user_password }}"
--os-tenant-name="{{ tenant_name }}"
dependency
- name: put account container docker_images
command: swift post
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ user_name }}"
--os-password="{{ user_password }}"
--os-tenant-name="{{ tenant_name }}"
--read-acl "{{ storlet_management_account }}:{{ storlet_management_admin_username }}"
--write-acl "{{ storlet_management_account }}:{{ storlet_management_admin_username }}"
docker_images
- name: save default storlet docker image as tar file
command: docker save -o /tmp/{{ base_os_image }}_jre8_storlets.tar {{ hostvars[groups['docker'][0]]['inventory_hostname'] }}:{{ docker_registry_port }}/{{ base_os_image }}_jre8_storlets
- name: upload docker image to docker_images container
command: swift upload
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ user_name }}"
--os-password="{{ user_password }}"
--os-tenant-name="{{ tenant_name }}"
docker_images {{ base_os_image }}_jre8_storlets.tar
-H "X-Object-Meta-image_name:{{ storlets_image_name_suffix }}"
args:
chdir: "/tmp"
- name: remove storlet docker image tar file
command: rm /tmp/{{ base_os_image }}_jre8_storlets.tar

View File

@ -1,18 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
FROM {{ tenant_image_name }}
MAINTAINER root

View File

@ -1,65 +0,0 @@
#!/usr/bin/python
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
import json
import subprocess
import sys
def extractId(tar_file_name, repository, tag):
subprocess.call(['tar', 'xf', tar_file_name, 'repositories'])
repository_file = open('repositories')
j = json.loads(repository_file.read())
if repository not in j:
print("Not Found")
else:
pairs = j[repository]
if tag:
if tag not in pairs:
print("Not Found")
else:
print(pairs[tag])
else:
if len(pairs) != 1:
print("No tag supplied. Ambiguous")
else:
print(pairs.values()[0])
repository_file.close()
subprocess.call(['rm', '-f', 'repositories'])
def usage(argv):
print(argv[0] + " <tar_file> <repository> [tag]")
def main(argv):
if len(argv) < 3 or len(argv) > 4:
usage(argv)
return
tar_file_name = argv[1]
repository = argv[2]
tag = None
if len(argv) >= 4:
tag = argv[3]
extractId(tar_file_name, repository, tag)
if __name__ == "__main__":
main(sys.argv)

View File

@ -1,18 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- hosts: storlet-proxy:storlet-storage
roles:
- pull_tenant_image

View File

@ -1,25 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- name: Get the tenant id from Keystone
shell: keystone --os-endpoint={{ keystone_admin_url }} --os-token={{ keystone_admin_token }} tenant-list | grep {{ tenant_name }} | awk '{print $2}'
register: tenant_id
- name: docker pull
command: docker pull {{ hostvars[groups['docker'][0]]['inventory_hostname'] }}:{{ docker_registry_port }}/{{ tenant_id.stdout_lines[0] }}
- name: shutdown_container
shell: "/usr/bin/python {{ lxc_device }}/scripts/send_halt_cmd_to_daemon_factory.py
{{ lxc_device }}/pipes/scopes/AUTH_{{ tenant_id.stdout_lines[0] }}/factory_pipe"

View File

@ -1,18 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- hosts: storlet-mgmt
roles:
- push_tenant_image

View File

@ -1,65 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- name: Get the tenant id from Keystone
shell: keystone --os-endpoint={{ keystone_admin_url }} --os-token={{ keystone_admin_token }} tenant-list | grep {{ tenant_name }} | awk '{print $2}'
register: tenant_id
- name: get image tar file
command: swift download
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ storlet_management_admin_username }}"
--os-password="{{ storlet_manager_admin_password }}"
--os-tenant-name="{{ storlet_management_account }}"
--os-storage-url="{{ swift_public_url }}/AUTH_{{ tenant_id.stdout_lines[0] }}"
docker_images "{{ tar_object_name }}"
args:
chdir: "{{ storlet_management_install_dir }}"
- name: load image to local docker registry
shell: docker load -i "{{ storlet_management_install_dir }}/{{ tar_object_name }}"
- name: create the tenant specific docker image step 1 - create repo dir
file:
state: directory
dest: "/data/registry/repositories/{{ tenant_id.stdout_lines[0] }}"
owner: root
mode: 0755
- name: create the tenant specific docker image step 2 - create Docker file
template:
src: create_tenant_image_Dockerfile
dest: "/data/registry/repositories/{{ tenant_id.stdout_lines[0] }}/Dockerfile"
owner: root
mode: 0755
- name: create the tenant specific docker image step 3 - copy tenant_id file to build dir
template:
src: tenant_id
dest: "/data/registry/repositories/{{ tenant_id.stdout_lines[0] }}/tenant_id"
owner: root
mode: 0755
- name: "Build the image {{ tenant_id.stdout_lines[0] }}"
command: "docker build -q -t {{ hostvars[groups['docker'][0]]['inventory_hostname'] }}:{{ docker_registry_port }}/{{ tenant_id.stdout_lines[0] }} ."
args:
chdir: "/data/registry/repositories/{{ tenant_id.stdout_lines[0] }}"
register: command_result
failed_when: "'sha256:' not in command_result.stdout"
- name: Push the image to the global registry
command: "docker push {{ hostvars[groups['docker'][0]]['inventory_hostname'] }}:{{ docker_registry_port }}/{{ tenant_id.stdout_lines[0] }}"
- name: remove storlet docker image tar file
command: rm "{{ storlet_management_install_dir }}/{{ tar_object_name }}"

View File

@ -1,19 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- hosts: storlet-mgmt
roles:
- add_new_tenant

View File

@ -1 +0,0 @@
{{ tenant_id.stdout_lines[0] }}

View File

@ -1,87 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- name: Install Ansible
shell: dpkg --get-selections | grep ansible | awk {'print $2'} | grep -w install | wc -l
register: dpkg
- shell: apt-cache showpkg ansible | grep 1.9.1-1ppa~trusty | wc -l
register: add_repo
- apt_repository: repo='ppa:ansible/ansible' state=present
when: "'0' in add_repo.stdout_lines[0]"
- apt: name=ansible-1.9.1-1ppa~trusty state=present update-cache=yes force=yes
when: "'0' in dpkg.stdout_lines[0]"
- name: Install Dependencies
apt:
pkg: "{{ item }}"
state: latest
with_items:
- python-swiftclient
- python-keystoneclient
- sshpass
- name: create storlet management installation dir
file: state=directory dest="{{ item }}"
with_items:
- "{{ storlet_management_ansible_dir }}/roles/add_new_tenant/tasks"
- "{{ storlet_management_ansible_dir }}/roles/pull_tenant_image/tasks"
- "{{ storlet_management_ansible_dir }}/roles/push_tenant_image/tasks"
- "{{ storlet_management_ansible_dir }}/roles/push_tenant_image/templates"
- "{{ storlet_management_ansible_dir }}/deploy"
- name: copy dynamic inventory file
copy: src="{{ inventory_file }}" dest="{{ storlet_management_ansible_dir }}/storlets_mgmt_dynamic_inventory.py" mode=0755
- name: create storlet_mgmt_common.py file
template:
src: "storlet_mgmt_common_py_file"
dest: "{{ storlet_management_install_dir }}/storlet_mgmt_common.py"
owner: root
mode: 0755
- name: create add_new_tenant.py file
template:
src: "add_new_tenant_py_file"
dest: "{{ storlet_management_install_dir }}/add_new_tenant.py"
owner: root
mode: 0755
- name: create deploy_image.py file
template:
src: "deploy_image_py_file"
dest: "{{ storlet_management_install_dir }}/deploy_image.py"
owner: root
mode: 0755
- copy: src={{item}} dest={{ storlet_management_ansible_dir }}/{{ item }}
with_items:
- pull_tenant_image.yml
- push_tenant_image.yml
- storlets_add_new_tenant.yml
- ansible_storlet_management_vars.py
- copy: src=add_new_tenant_main.yml dest={{ storlet_management_ansible_dir }}/roles/add_new_tenant/tasks/main.yml
- copy: src=pull_tenant_image_main.yml dest={{ storlet_management_ansible_dir }}/roles/pull_tenant_image/tasks/main.yml
- copy: src=push_tenant_image_main.yml dest={{ storlet_management_ansible_dir }}/roles/push_tenant_image/tasks/main.yml
- copy: src=create_tenant_image_Dockerfile dest={{ storlet_management_ansible_dir }}/roles/push_tenant_image/templates/create_tenant_image_Dockerfile
- copy: src=tenant_id dest={{ storlet_management_ansible_dir }}/roles/push_tenant_image/templates/tenant_id

View File

@ -1,56 +0,0 @@
#!/usr/bin/python
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
import sys
import subprocess
from storlet_mgmt_common import get_hosts_object, monitor_playbook_execution
def add_new_tenant(tenant_name, user_name, user_password):
p = subprocess.Popen(['ansible-playbook', '-s',
'-i', 'storlets_mgmt_dynamic_inventory.py',
'storlets_add_new_tenant.yml',
'-e', 'tenant_name=' + tenant_name,
'-e', 'user_name=' + user_name,
'-e', 'user_password=' + user_password,
'-e', 'storlets_image_name_suffix=' +
'{{ storlets_image_name_suffix }}'],
env={"ANSIBLE_HOST_KEY_CHECKING" : "False"},
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd = "{{ storlet_management_ansible_dir }}")
monitor_playbook_execution(p)
def usage(argv):
print argv[0] + " <tenant_name> <user_name> <user_password>"
def main(argv):
if len(argv) != 4:
usage(argv)
return
tenant_name = argv[1]
user_name = argv[2]
user_password = argv[3]
get_hosts_object()
add_new_tenant(tenant_name, user_name, user_password)
if __name__ == "__main__":
main(sys.argv)

View File

@ -1,67 +0,0 @@
#!/usr/bin/python
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
import sys
import select
import subprocess
from storlet_mgmt_common import get_hosts_object, monitor_playbook_execution
def deploy_image(tenant_name, tar_object_name, tenant_image_name):
get_hosts_object()
p = subprocess.Popen(['ansible-playbook', '-s',
'-i', 'storlets_mgmt_dynamic_inventory.py',
'push_tenant_image.yml',
'-e', 'tar_object_name=' + tar_object_name,
'-e', 'tenant_name=' + tenant_name,
'-e', 'tenant_image_name=' + tenant_image_name],
env={"ANSIBLE_HOST_KEY_CHECKING" : "False"},
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd = "{{ storlet_management_ansible_dir }}")
monitor_playbook_execution(p)
p = subprocess.Popen(['ansible-playbook', '-s',
'-i', 'storlets_mgmt_dynamic_inventory.py',
'pull_tenant_image.yml',
'-e', 'tenant_name=' + tenant_name],
env={"ANSIBLE_HOST_KEY_CHECKING" : "False"},
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd = "{{ storlet_management_ansible_dir }}")
monitor_playbook_execution(p)
def usage(argv):
print argv[0] + " <tenant_name> <tar_object_name> <tenant_image_name>"
def main(argv):
if len(argv) != 4:
usage(argv)
return
tenant_name = argv[1]
tar_object_name = argv[2]
tenant_image_name = argv[3]
deploy_image(tenant_name, tar_object_name, tenant_image_name)
if __name__ == "__main__":
main(sys.argv)

View File

@ -1,74 +0,0 @@
#!/usr/bin/python
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
import os
import sys
import select
import subprocess
from swiftclient import client as c
def get_hosts_object():
os_options = {'tenant_name': '{{ storlet_management_account }}'}
url, token = c.get_auth('{{ keystone_public_url }}', '{{ storlet_management_account }}' + ":" + '{{ storlet_management_admin_username }}',
'{{ storlet_manager_admin_password }}', os_options=os_options,
auth_version="2.0")
response = dict()
headers, content = c.get_object(
url,
token,
'{{ storlet_management_swift_topology_container }}',
'{{ storlet_management_swift_topology_object }}',
None,
None,
None,
response_dict=response,
headers=None)
assert(response.get('status') == 200)
f = open("{{ storlet_management_ansible_dir }}/deploy/{{ storlet_management_swift_topology_object }}", "w")
f.write(content)
f.close()
os.chmod("{{ storlet_management_ansible_dir }}/deploy/{{ storlet_management_swift_topology_object }}", 0666)
def monitor_playbook_execution(p):
#stdout = []
#stderr = []
stdout_pipe = p.stdout
stderr_pipe = p.stderr
while True:
reads = [stdout_pipe.fileno(), stderr_pipe.fileno()]
ret = select.select(reads, [], [])
for fd in ret[0]:
if fd == stdout_pipe.fileno():
read = stdout_pipe.readline()
sys.stdout.write(read)
#stdout.append(read)
if "FATAL" in read:
raise Exception("Error while executing ansible script")
if fd == stderr_pipe.fileno():
read = stderr_pipe.readline()
sys.stderr.write(read)
#stderr.append(read)
if "FATAL" in read:
raise Exception("Error while executing ansible script")
if p.poll() != None:
break

View File

@ -1,20 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- hosts: storlet-mgmt
roles:
- role: docker_client
- role: swift_storlet_management
- role: ansible_storlet_management

View File

@ -1,97 +0,0 @@
#! /usr/bin/python
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
import json
from ansible_storlet_management_vars import mgmt_vars
class Inventory(object):
'''
Ansible inventory , generated from config file
'''
def __init__(self, fname):
self.__load_config__(fname)
def __load_config__(self, name):
with open(name) as f:
self.conf = json.loads(f.read())
def show_list(self):
g = {}
for group in ['storlet-mgmt', 'storlet-proxy', 'storlet-storage',
'docker']:
g[group] = dict()
g[group]['hosts'] = self.conf['groups'][group]
g[group]['vars'] = dict()
g[group]['vars'].update(self.conf['all'])
return g
def show_host(self, name):
res = dict()
res['ansible_ssh_user'] = self.conf['all']['ansible_ssh_user']
return res
def write_inventory(self, inventory_file):
inventory = dict()
inventory['groups'] = self.conf['groups']
for group in ['storlet-mgmt', 'storlet-proxy', 'storlet-storage',
'docker']:
for host in self.conf['groups'][group]:
if host not in inventory:
inventory[host] = dict()
if group == 'storlet-mgmt':
inventory[host]['ansible_ssh_user'] =\
self.conf['all']['storlets_management_user']
else:
inventory[host]['ansible_ssh_user'] =\
self.conf['all']['ansible_ssh_user']
all_vars = dict()
for v in mgmt_vars:
all_vars[v] = self.conf['all'][v]
inventory['all'] = all_vars
with open(inventory_file, 'w') as f:
f.write(json.dumps(inventory))
return inventory
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--list', action='store_true')
parser.add_argument('--host')
parser.add_argument('--inventory')
args = parser.parse_args()
inventory = Inventory('deploy/cluster_config.json')
out = {}
if args.list:
out = inventory.show_list()
if args.host:
out = inventory.show_host(args.host)
if args.inventory:
out = inventory.write_inventory(args.inventory)
print(json.dumps(out))
if __name__ == '__main__':
main()

View File

@ -1,70 +0,0 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
- name: Create the Storlet management tenant
keystone_user:
endpoint: "{{ keystone_admin_url }}"
token: "{{ keystone_admin_token }}"
tenant: "{{ storlet_management_account }}"
tenant_description: The storlets management tenant
- name: create the user {{ storlet_management_admin_username }} for tenant {{ storlet_management_account }}
keystone_user:
endpoint: "{{ keystone_admin_url }}"
token: "{{ keystone_admin_token }}"
tenant: "{{ storlet_management_account }}"
user: "{{ storlet_management_admin_username }}"
password: "{{ storlet_manager_admin_password }}"
- name: assign {{ storlet_management_admin_username }} an admin role
keystone_user:
endpoint: "{{ keystone_admin_url }}"
token: "{{ keystone_admin_token }}"
tenant: "{{ storlet_management_account }}"
user: "{{ storlet_management_admin_username }}"
role: admin
- name: Create the cluster information object
command: python storlets_dynamic_inventory.py
--inventory "{{ playbook_dir }}/deploy/temp_{{ storlet_management_swift_topology_object }}"
args:
chdir: "{{ playbook_dir }}"
- name: Create the cluster information container
command: swift
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ storlet_management_admin_username }}"
--os-password="{{ storlet_manager_admin_password }}"
--os-tenant-name="{{ storlet_management_account }}"
post "{{ storlet_management_swift_topology_container }}"
--read-acl "{{ storlet_management_account }}:{{ storlet_management_admin_username }}"
--write-acl "{{ storlet_management_account }}:{{ storlet_management_admin_username }}"
--meta "{{ storlets_enabled_attribute_name }}:true"
- name: Upload the cluster information object
command: swift
--os-auth-url="{{ keystone_public_url }}"
--os-username="{{ storlet_management_admin_username }}"
--os-password="{{ storlet_manager_admin_password }}"
--os-tenant-name="{{ storlet_management_account }}"
upload "{{ storlet_management_swift_topology_container }}" "temp_{{ storlet_management_swift_topology_object }}"
--object-name "{{ storlet_management_swift_topology_object }}"
args:
chdir: "{{ playbook_dir }}/deploy"
- name: delete cluster information file
file:
path="{{ playbook_dir }}/deploy/temp_{{ storlet_management_swift_topology_object }}"
state=absent

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2016 All Rights Reserved
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: cluster_config.json from template
hosts: localhost

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import ConfigParser
import fileinput

View File

@ -1,17 +1,19 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
# TODO(eranr): Change thebelow to use Ansible os_project_facts module
- name: Get the defaut tenant id from Keystone
shell: openstack --os-auth-url={{ keystone_public_url }} --os-username= {{ keystone_admin_user }} --os-password={{ keystone_admin_password }} --os-project-name={{ keystone_admin_project }} project list | grep {{ storlets_default_tenant_name }} | awk '{print $2}'

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
FROM {{base_os_image}}_jre8_storlets

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: Create {{ dockerfile_prefix }} Docker file
template:

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
# Include here task file for various base images, e.g., centosXXX-jre8.yml
- include: ubuntu_14.04_jre8.yml

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: Tag the Ubuntu 14.04 image
shell: docker images | grep ubuntu_14.04 | wc -l

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
FROM ubuntu:14.04

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: Test for missing packages
shell: dpkg --get-selections | grep aufs-tools | wc -l

View File

@ -0,0 +1,42 @@
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Create docker-registry service
stat: path=/etc/init.d/docker-registry
register: st0
- template:
src: etc/init.d/docker-registry
dest: /etc/init.d/docker-registry
owner: root
mode: 0755
when: not st0.stat.exists
- name: Start Docker repository service
shell: bash -c "/usr/sbin/service docker-registry start"
- name: Test repository
shell: docker images | grep my_busybox | wc -l
register: busy_box
- command: docker pull busybox
when: "'0' in busy_box.stdout_lines[0]"
- command: docker tag busybox "{{ inventory_hostname }}:{{ docker_registry_port }}/my_busybox"
when: "'0' in busy_box.stdout_lines[0]"
- command: docker push "{{ inventory_hostname }}:{{ docker_registry_port }}/my_busybox"
when: "'0' in busy_box.stdout_lines[0]"

View File

@ -1,19 +1,20 @@
#!/bin/bash
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
# This script is the our docker ENTRYPOINT
# $1 determines between debug mode running mode

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: Create {{ dockerfile_prefix }} Docker file
template:

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: Create Repository for building the image
file:

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
FROM {{base_os_image}}_jre8

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: restart swift
shell: swift-init --run-dir="{{swift_run_time_dir}}" all {{ item }}

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: create installation directory
shell: mkdir -p {{ engine_install_dir }} creates={{ engine_install_dir }}

View File

@ -1,17 +1,18 @@
#---------------------------------------------------------------------------
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# Limitations under the License.
#---------------------------------------------------------------------------
# limitations under the License.
- name: test os version
assert:

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -13,14 +14,6 @@
* Limitations under the License.
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-2014 eranr Initial implementation as sChannel.
Introducing wrapping structures.
20-Jun-2014 evgenyl Switching to SBus. Code refactoring.
Simplifying API. Removing business logic.
===========================================================================*/
#ifndef schannel_h
#define schannel_h

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,11 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-YYYY eranr Initial implementation.
09-Jul-2014 evgenyl Refactoring.
17-Jul-2014 evgenyl Covering zero meta-data in "receive" function.
===========================================================================*/
#include <jni.h>
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright (c) 2010-2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
08-Jul-2014 evgenyl Initial implementation.
===========================================================================*/
package org.openstack.storlet.sbus;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,13 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-2014 eranr Initial implementation as sChannel.
Introducing wrapping structures.
30-Jun-2014 evgenyl Switching to SBus. Code refactoring.
Simplifying API. Extracting business logic.
===========================================================================*/
package org.openstack.storlet.sbus;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,13 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-2014 eranr Initial implementation as sChannel.
Introducing wrapping structures.
30-Jun-2014 evgenyl Switching to SBus. Code refactoring.
Simplifying API. Extracting business logic.
===========================================================================*/
package org.openstack.storlet.sbus;
/*----------------------------------------------------------------------------

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,12 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-2014 eranr Initial implementation as sChannel.
Introducing wrapping structures.
30-Jun-2014 evgenyl Switching to SBus. Code refactoring.
===========================================================================*/
package org.openstack.storlet.sbus;
import java.io.FileDescriptor;

View File

@ -1,5 +1,7 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright (c) 2010-2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
import java.util.ArrayList;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
public class ObjectRequestEntry {

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
import java.util.HashMap;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
import java.io.FileDescriptor;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,11 +15,9 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
public class StorletException extends Exception {
/**
*

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
import java.io.FileDescriptor;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
import java.io.FileDescriptor;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*
* Author: eranr
*/
package org.openstack.storlet.common;
import java.io.FileDescriptor;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
09-Sep-2014 evgenyl Initial implementation. Added getClassFolder().
===========================================================================*/
package org.openstack.storlet.common;
public class StorletUtils {

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright (c) 2010-2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,9 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
20-Jul-2015 cdoron Initial implementation.
===========================================================================*/
package org.openstack.storlet.daemon;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-YYYY eranr Initial implementation.
10-Jul-2014 evgenyl Refactoring.
===========================================================================*/
package org.openstack.storlet.daemon;
import org.slf4j.Logger;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-YYYY eranr Initial implementation.
10-Jul-2014 evgenyl Refactoring.
===========================================================================*/
package org.openstack.storlet.daemon;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
/*----------------------------------------------------------------------------
* Copyright IBM Corp. 2015, 2015 All Rights Reserved
* Copyright (c) 2010-2016 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -14,10 +15,6 @@
* ---------------------------------------------------------------------------
*/
/*============================================================================
DD-MMM-YYYY eranr Initial implementation.
10-Jul-2014 evgenyl Refactoring.
===========================================================================*/
package org.openstack.storlet.daemon;
import java.io.IOException;

View File

@ -1,5 +1,6 @@
<!--
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Copyright (c) 2010-2016 OpenStack Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

View File

@ -1,17 +1,18 @@
"""-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------"""
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from eventlet import Timeout

View File

@ -1,17 +1,18 @@
"""-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------"""
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from contextlib import contextmanager

View File

@ -1,17 +1,19 @@
"""-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------"""
from storlets.gateway.common.stob import StorletRequest

View File

@ -1,17 +1,18 @@
"""-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------"""
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import shutil

View File

@ -1,17 +1,19 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
from storlets.gateway.common.stob import StorletRequest, StorletResponse
from storlets.gateway.gateways.base import StorletGatewayBase

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2016 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
'''
*VERY* initial cluster configuration file

View File

@ -1,17 +1,19 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2016 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
import sys
import zipfile
from storlets.tools.cluster_config_parser import ClusterConfig

View File

@ -1,17 +1,19 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2016 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
import os
from swiftclient import client

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2010-2011 OpenStack Foundation
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2010-2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import os

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from swiftclient import client as c
from tests.functional.java import StorletJavaFunctionalTest

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import pexpect
from tests.functional import StorletBaseFunctionalTest, PATH_TO_STORLETS

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from swiftclient import client as c
from tests.functional.java import StorletJavaFunctionalTest

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import random
import string

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import random

View File

@ -1,17 +1,18 @@
'''----------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
----------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from swiftclient import client as c
from tests.functional.java import StorletJavaFunctionalTest

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import threading
from swiftclient import client as swift_client

View File

@ -1,17 +1,18 @@
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
Limitations under the License.
-------------------------------------------------------------------------'''
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from swiftclient import client as c