Skip to content

Commit

Permalink
Merge "[CE-58] Add license header for src folder"
Browse files Browse the repository at this point in the history
  • Loading branch information
yeasy authored and Gerrit Code Review committed Jun 23, 2017
2 parents 44631ff + 77d0b0b commit 205e17f
Show file tree
Hide file tree
Showing 122 changed files with 677 additions and 11 deletions.
5 changes: 5 additions & 0 deletions src/Dockerfile-dashboard
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
FROM python:3.5
MAINTAINER Baohua Yang <"[email protected]">
ENV TZ Asia/Shanghai
Expand Down
5 changes: 5 additions & 0 deletions src/Dockerfile-restserver
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
FROM python:3.5
MAINTAINER Baohua Yang <"[email protected]">
ENV TZ Asia/Shanghai
Expand Down
5 changes: 5 additions & 0 deletions src/Dockerfile-watchdog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
FROM python:3.5
MAINTAINER Baohua Yang <"[email protected]">
ENV TZ Asia/Shanghai
Expand Down
5 changes: 5 additions & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
from .version import version, author

__title__ = 'Cello'
Expand Down
5 changes: 5 additions & 0 deletions src/agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Agent pkg provides drivers to those underly platforms, e.g., swarm/k8s. jAS

from .docker.docker_swarm import get_project, \
Expand Down
5 changes: 5 additions & 0 deletions src/agent/cluster_base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import abc


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This compose file will start 4 hyperledger peer nodes, and make a cluster
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# vp0: validating node as root
# vp1 - vp3: validating node as peer
# https://github.com/yeasy/docker-compose-files#hyperledger
Expand Down Expand Up @@ -46,7 +50,6 @@ services:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=${COMPOSE_PROJECT_NAME}_vp0:7051


# validating node
vp3:
extends:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This compose file will start 6 hyperledger peer nodes, and make a cluster
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# vp0: validating node as root
# vp1 - vp5: validating node as peer
# https://github.com/yeasy/docker-compose-files#hyperledger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This is the default base file to config env and command
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Notice that chaincode is executed inside docker in default net mode
# https://github.com/yeasy/docker-compose-files

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This compose file will start 4 hyperledger peer nodes, and make a cluster
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# vp0: validating node as root
# vp1: validating node as peer
# vp2: validating node as peer
Expand Down Expand Up @@ -48,7 +52,6 @@ services:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=${COMPOSE_PROJECT_NAME}_vp0:7051


# validating node
vp3:
extends:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This compose file will start 4 hyperledger peer nodes, and make a cluster
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# vp0: validating node as root
# vp1: validating node as peer
# vp2: validating node as peer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This is the default base file to config env and command
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Notice that chaincode is executed inside docker in default net mode
# https://github.com/yeasy/docker-compose-files

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'

services:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'

services:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * ca
# * orderer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash +x

# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

#set -e

CHANNEL_NAME=$1
Expand Down Expand Up @@ -35,7 +40,6 @@ function replacePrivateKey () {

sed $OPTS "s#CRYPTO_PATH#${CRYPTO_PATH}#g" cluster-7.yml


cp docker-compose-base-template.yaml docker-compose-base.yaml
sed $OPTS "s#CRYPTO_PATH#${CRYPTO_PATH}#g" docker-compose-base.yaml
sed $OPTS "s#ARTIFACT_PATH#${ARTIFACT_PATH}#g" docker-compose-base.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
peer-base:
Expand Down
5 changes: 5 additions & 0 deletions src/agent/docker/_compose_files/fabric-1.0/local/peer.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# This is the default base file to config env and command

# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Notice that chaincode is executed inside docker in default net mode
# https://github.com/yeasy/docker-compose-files

Expand Down
5 changes: 5 additions & 0 deletions src/agent/docker/cluster.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import logging
import os
import sys
Expand Down
5 changes: 5 additions & 0 deletions src/agent/docker/docker_swarm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# This module provides some static api to operate compose and docker engine

import logging
Expand Down
5 changes: 5 additions & 0 deletions src/agent/docker/host.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import datetime
import logging
import os
Expand Down
5 changes: 5 additions & 0 deletions src/agent/host_base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import abc


Expand Down
5 changes: 5 additions & 0 deletions src/agent/k8s/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# This is for agent that interacts with Kubernetes platform
5 changes: 5 additions & 0 deletions src/agent/k8s/host.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
from ..host_base import HostBase


Expand Down
4 changes: 4 additions & 0 deletions src/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
from .db import db, col_host
from .response import make_ok_response, make_fail_response, CODE_NOT_FOUND,\
CODE_BAD_REQUEST, CODE_CONFLICT, CODE_CREATED, CODE_FORBIDDEN, \
Expand Down
5 changes: 5 additions & 0 deletions src/common/db.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import os

from pymongo import MongoClient
Expand Down
5 changes: 5 additions & 0 deletions src/common/log.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import os
import logging

Expand Down
5 changes: 5 additions & 0 deletions src/common/response.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
from flask import jsonify

CODE_OK = 200
Expand Down
5 changes: 5 additions & 0 deletions src/common/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import json
import os

Expand Down
7 changes: 7 additions & 0 deletions src/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#


class Config(object):
DEBUG = False
SECRET_KEY = '?\xbf,\xb4\x8d\xa3"<\x9c\xb0@\x0f5\xab,w\xee\x8d$0\x13\x8b83'
Expand Down
5 changes: 5 additions & 0 deletions src/dashboard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import os
from common import log_handler, LOG_LEVEL
from flask import Flask, render_template
Expand Down
5 changes: 5 additions & 0 deletions src/modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
from .cluster import cluster_handler
from .host import host_handler
from .stat import stat_handler
5 changes: 5 additions & 0 deletions src/modules/cluster.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import datetime
import logging
import os
Expand Down
5 changes: 5 additions & 0 deletions src/modules/host.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import datetime
import logging
import os
Expand Down
6 changes: 6 additions & 0 deletions src/modules/scheduler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#


class Scheduler(object):
def __init__(self):
pass
Expand Down
5 changes: 5 additions & 0 deletions src/modules/stat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import logging
import time
from threading import Thread
Expand Down
5 changes: 5 additions & 0 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
docker-compose>=1.7.0,<=1.9.0
Flask>=0.10.0,<=1.12.0
greenlet>=0.4.5,<=0.4.12
Expand Down
5 changes: 5 additions & 0 deletions src/resources/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
from .index import bp_index

from .host_api import bp_host_api
Expand Down
5 changes: 5 additions & 0 deletions src/resources/cluster_api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import logging
import os
import sys
Expand Down
5 changes: 5 additions & 0 deletions src/resources/cluster_view.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import logging
import os
import sys
Expand Down
5 changes: 5 additions & 0 deletions src/resources/host_api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
import logging
import os
import sys
Expand Down
Loading

0 comments on commit 205e17f

Please sign in to comment.