Merge branch 'master' of github.com:jermowery/xos into AddVPNService
diff --git a/xos/configurations/acord/Makefile b/xos/configurations/acord/Makefile
new file mode 100644
index 0000000..5231e79
--- /dev/null
+++ b/xos/configurations/acord/Makefile
@@ -0,0 +1,59 @@
+SETUPDIR:=../setup
+MYIP:=$(shell hostname -i)
+
+cloudlab: common_cloudlab acord
+
+devstack: upgrade_pkgs common_devstack devstack_net_fix acord
+
+acord: ceilometer_dashboard
+ sudo MYIP=$(MYIP) docker-compose up -d
+ bash ../common/wait_for_xos.sh
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/acord/ceilometer.yaml
+
+containers:
+ cd ../../../containers/xos; make devel
+ cd ../../../containers/synchronizer; make
+
+common_cloudlab:
+ make -C ../common -f Makefile.cloudlab
+
+common_devstack:
+ make -C ../common -f Makefile.devstack
+
+ceilometer_dashboard:
+ #NOTE: The below dashboard install scripts assume
+ #clouldlab openstack environment created using "OpenStack" profile
+ #bash install_xos_ceilometer_dashboard.sh
+ #bash install_ceilometer_patch.sh
+
+stop:
+ sudo MYIP=$(MYIP) docker-compose stop
+
+rm: stop
+ sudo MYIP=$(MYIP) docker-compose rm
+
+showlogs:
+ sudo MYIP=$(MYIP) docker-compose logs
+
+ps:
+ sudo MYIP=$(MYIP) docker-compose ps
+
+cleanup: stop rm
+ ./cleanup.sh
+ bash -c "source ../setup/admin-openrc.sh; nova list --all-tenants; neutron net-list"
+
+devstack_net_fix:
+ sudo ../common/devstack/net-fix.sh
+ sudo bash -c "source ../setup/admin-openrc.sh; neutron subnet-update private-subnet --dns-nameservers list=true 8.8.8.8 8.8.4.4"
+
+upgrade_pkgs:
+ sudo pip install httpie --upgrade
+
+rebuild_xos:
+ make -C ../../../containers/xos devel
+
+rebuild_synchronizer:
+ make -C ../../../containers/synchronizer
diff --git a/xos/configurations/acord/ceilometer.yaml b/xos/configurations/acord/ceilometer.yaml
new file mode 100644
index 0000000..874c577
--- /dev/null
+++ b/xos/configurations/acord/ceilometer.yaml
@@ -0,0 +1,249 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Setup CORD-related services -- vOLT, vCPE, vBNG.
+
+imports:
+ - custom_types/xos.yaml
+
+node_types:
+ tosca.nodes.SFlowService:
+ derived_from: tosca.nodes.Root
+ description: >
+ XOS SFlow Collection Service
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ service:
+ type: tosca.capabilities.xos.Service
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Type of service.
+ view_url:
+ type: string
+ required: false
+ description: URL to follow when icon is clicked in the Service Directory.
+ icon_url:
+ type: string
+ required: false
+ description: ICON to display in the Service Directory.
+ enabled:
+ type: boolean
+ default: true
+ published:
+ type: boolean
+ default: true
+ description: If True then display this Service in the Service Directory.
+ public_key:
+ type: string
+ required: false
+ description: Public key to install into Instances to allows Services to SSH into them.
+ private_key_fn:
+ type: string
+ required: false
+ description: Location of private key file
+ versionNumber:
+ type: string
+ required: false
+ description: Version number of Service.
+ sflow_port:
+ type: integer
+ required: false
+ default: 6343
+ description: sFlow listening port
+ sflow_api_port:
+ type: integer
+ required: false
+ default: 33333
+ description: sFlow publish subscribe api listening port
+
+ tosca.nodes.CeilometerService:
+ derived_from: tosca.nodes.Root
+ description: >
+ XOS Ceilometer Service
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ service:
+ type: tosca.capabilities.xos.Service
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Type of service.
+ view_url:
+ type: string
+ required: false
+ description: URL to follow when icon is clicked in the Service Directory.
+ icon_url:
+ type: string
+ required: false
+ description: ICON to display in the Service Directory.
+ enabled:
+ type: boolean
+ default: true
+ published:
+ type: boolean
+ default: true
+ description: If True then display this Service in the Service Directory.
+ public_key:
+ type: string
+ required: false
+ description: Public key to install into Instances to allows Services to SSH into them.
+ private_key_fn:
+ type: string
+ required: false
+ description: Location of private key file
+ versionNumber:
+ type: string
+ required: false
+ description: Version number of Service.
+ ceilometer_pub_sub_url:
+ type: string
+ required: false
+ description: REST URL of ceilometer PUB/SUB component
+
+ tosca.nodes.CeilometerTenant:
+ derived_from: tosca.nodes.Root
+ description: >
+ CORD: A Tenant of the Ceilometer Service.
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Kind of tenant
+
+topology_template:
+ node_templates:
+ service_ceilometer:
+ type: tosca.nodes.CeilometerService
+ requirements:
+ properties:
+ view_url: /admin/ceilometer/ceilometerservice/$id$/
+ kind: ceilometer
+ ceilometer_pub_sub_url: http://10.11.10.1:4455/
+# public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+# artifacts:
+# pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
+
+# service_sflow:
+# type: tosca.nodes.SFlowService
+# requirements:
+# properties:
+# view_url: /admin/ceilometer/sflowservice/$id$/
+# kind: sflow
+# sflow_port: 6343
+# sflow_api_port: 33333
+
+ Private:
+ type: tosca.nodes.NetworkTemplate
+
+ ceilometer_network:
+ type: tosca.nodes.network.Network.XOS
+ properties:
+ ip_version: 4
+ labels: ceilometer_client_access
+ requirements:
+ - network_template:
+ node: Private
+ relationship: tosca.relationships.UsesNetworkTemplate
+ - owner:
+ node: mysite_ceilometer
+ relationship: tosca.relationships.MemberOfSlice
+ - connection:
+ node: mysite_ceilometer
+ relationship: tosca.relationships.ConnectsToSlice
+
+ mysite:
+ type: tosca.nodes.Site
+
+ trusty-server-multi-nic:
+ type: tosca.nodes.Image
+
+ mysite_ceilometer:
+ description: Ceilometer Proxy Slice
+ type: tosca.nodes.Slice
+ requirements:
+ - ceilometer_service:
+ node: service_ceilometer
+ relationship: tosca.relationships.MemberOfService
+ - site:
+ node: mysite
+ relationship: tosca.relationships.MemberOfSite
+ - default_image:
+ node: trusty-server-multi-nic
+ relationship: tosca.relationships.DefaultImage
+ properties:
+ default_flavor: m1.medium
+ max_instances: 2
+
+# mysite_sflow:
+# description: Slice for sFlow service
+# type: tosca.nodes.Slice
+# requirements:
+# - sflow_service:
+# node: service_sflow
+# relationship: tosca.relationships.MemberOfService
+# - site:
+# node: mysite
+# relationship: tosca.relationships.MemberOfSite
+# properties:
+# default_flavor: m1.small
+# max_instances: 2
+
+ my_ceilometer_tenant:
+ description: Ceilometer Service default Tenant
+ type: tosca.nodes.CeilometerTenant
+ requirements:
+ - provider_service:
+ node: service_ceilometer
+ relationship: tosca.relationships.MemberOfService
+
+ # Virtual machines
+# sflow_service_instance:
+# type: tosca.nodes.Compute
+# capabilities:
+# # Host container properties
+# host:
+# properties:
+# num_cpus: 1
+# disk_size: 10 GB
+# mem_size: 4 MB
+# # Guest Operating System properties
+# os:
+# properties:
+# # host Operating System image properties
+# architecture: x86_64
+# type: linux
+# distribution: Ubuntu
+# version: 14.10
+# requirements:
+# - slice:
+# node: mysite_sflow
+# relationship: tosca.relationships.MemberOfSlice
+
+ Ceilometer:
+ type: tosca.nodes.DashboardView
+ properties:
+ url: template:xosCeilometerDashboard
+ Tenant:
+ type: tosca.nodes.DashboardView
+ properties:
+ no-create: true
+ no-update: true
+ no-delete: true
+
+ padmin@vicci.org:
+ type: tosca.nodes.User
+ properties:
+ firstname: XOS
+ lastname: admin
+ is_admin: true
+ requirements:
+ - tenant_dashboard:
+ node: Tenant
+ relationship: tosca.relationships.UsesDashboard
+ - ceilometer_dashboard:
+ node: Ceilometer
+ relationship: tosca.relationships.UsesDashboard
diff --git a/xos/configurations/acord/ceilometer_pub_sub.tar.gz b/xos/configurations/acord/ceilometer_pub_sub.tar.gz
new file mode 100644
index 0000000..eb88a2b
--- /dev/null
+++ b/xos/configurations/acord/ceilometer_pub_sub.tar.gz
Binary files differ
diff --git a/xos/configurations/acord/cleanup.sh b/xos/configurations/acord/cleanup.sh
new file mode 100755
index 0000000..91d821c
--- /dev/null
+++ b/xos/configurations/acord/cleanup.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+function cleanup_network {
+ NETWORK=$1
+ SUBNETS=`neutron net-show $NETWORK | grep -i subnets | awk '{print $4}'`
+ if [[ $SUBNETS != "" ]]; then
+ PORTS=`neutron port-list | grep -i $SUBNETS | awk '{print $2}'`
+ for PORT in $PORTS; do
+ echo "Deleting port $PORT"
+ neutron port-delete $PORT
+ done
+ fi
+ neutron net-delete $NETWORK
+}
+
+source ../../setup/admin-openrc.sh
+
+echo "Deleting VMs"
+# Delete all VMs
+VMS=$( nova list --all-tenants|grep mysite|awk '{print $2}' )
+for VM in $VMS
+do
+ nova delete $VM
+done
+
+echo "Waiting 5 seconds..."
+sleep 5
+
+cleanup_network lan_network
+cleanup_network wan_network
+cleanup_network mysite_vsg-private
+cleanup_network mysite_vsg-access
+cleanup_network management
+
+echo "Deleting networks"
+# Delete all networks beginning with mysite_
+NETS=$( neutron net-list --all-tenants|grep mysite|awk '{print $2}' )
+for NET in $NETS
+do
+ neutron net-delete $NET
+done
+
+neutron net-delete lan_network || true
+neutron net-delete subscriber_network || true
+neutron net-delete public_network || true
+neutron net-delete hpc_client_network || true
+neutron net-delete ceilometer_network || true
+neutron net-delete management || true
+neutron net-delete mysite_vsg-access || true
diff --git a/xos/configurations/acord/docker-compose.yml b/xos/configurations/acord/docker-compose.yml
new file mode 100644
index 0000000..f40761a
--- /dev/null
+++ b/xos/configurations/acord/docker-compose.yml
@@ -0,0 +1,53 @@
+xos_db:
+ image: xosproject/xos-postgres
+ expose:
+ - "5432"
+
+xos_synchronizer_openstack:
+ command: bash -c "sleep 120; python /opt/xos/synchronizers/openstack/xos-synchronizer.py"
+ image: xosproject/xos-synchronizer-openstack
+ labels:
+ org.xosproject.kind: synchronizer
+ org.xosproject.target: openstack
+ links:
+ - xos_db
+ extra_hosts:
+ - ctl:${MYIP}
+ volumes:
+ - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
+ - ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
+ - ../setup:/root/setup:ro
+
+xos_synchronizer_monitoring_channel:
+ image: xosproject/xos-synchronizer-openstack
+ command: bash -c "sleep 120; python /opt/xos/synchronizers/monitoring_channel/monitoring_channel_synchronizer.py -C /opt/xos/synchronizers/monitoring_channel/monitoring_channel_synchronizer_config"
+ labels:
+ org.xosproject.kind: synchronizer
+ org.xosproject.target: monitoring_channel
+ links:
+ - xos_db
+ extra_hosts:
+ - ctl:${MYIP}
+ volumes:
+ - ../setup/id_rsa:/opt/xos/synchronizers/monitoring_channel/monitoring_channel_private_key:ro # private key
+
+
+# FUTURE
+#xos_swarm_synchronizer:
+# image: xosproject/xos-swarm-synchronizer
+# labels:
+# org.xosproject.kind: synchronizer
+# org.xosproject.target: swarm
+
+xos:
+ image: xosproject/xos
+ command: python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
+ ports:
+ - "9999:8000"
+ links:
+ - xos_db
+ volumes:
+ - ../setup:/root/setup:ro
+ - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
+ - ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
+ - ../setup/id_rsa.pub:/opt/xos/synchronizers/monitoring_channel/monitoring_channel_public_key:ro
diff --git a/xos/configurations/acord/install_ceilometer_patch.sh b/xos/configurations/acord/install_ceilometer_patch.sh
new file mode 100755
index 0000000..77aa05b
--- /dev/null
+++ b/xos/configurations/acord/install_ceilometer_patch.sh
@@ -0,0 +1,26 @@
+if [ -d /usr/lib/python2.7/dist-packages/ceilometer/network/ext_services ]; then
+ echo "Seems VCPE notification listeners are already enabled in ceilometer... so exiting gracefully..."
+ exit 0
+fi
+echo "Verifying if all the required files are present"
+if [ ! -f openstack_ceilometer_patch.tar.gz ] || [ ! -f ceilometer_pub_sub.tar.gz ];
+then
+ echo "File openstack_ceilometer_patch.tar.gz or ceilometer_pub_sub.tar.gz not found"
+ exit 1
+fi
+echo "Copying the ceilometer patch files to /usr/lib/python2.7/dist-packages/ceilometer"
+tar -xzf openstack_ceilometer_patch.tar.gz
+sudo mv ceilometer/network/ext_services /usr/lib/python2.7/dist-packages/ceilometer/network/
+sudo mv ceilometer/network/statistics/onos /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
+sudo mv /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/orig_init.orig_py
+sudo mv ceilometer/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
+sudo mv ceilometer-2015.1.1.egg-info/entry_points.txt /usr/lib/python2.7/dist-packages/ceilometer-*egg-info/
+sudo mv pipeline.yaml /etc/ceilometer/
+echo "Restarting ceilometer-agent-notification"
+sudo service ceilometer-agent-notification restart
+echo "Restarting ceilometer-agent-central"
+sudo service ceilometer-agent-central restart
+tar -xzf ceilometer_pub_sub.tar.gz
+echo "Starting Ceilometer PUB/SUB service"
+cd ceilometer_pub_sub
+python sub_main.py &
diff --git a/xos/configurations/acord/openstack_ceilometer_patch.tar.gz b/xos/configurations/acord/openstack_ceilometer_patch.tar.gz
new file mode 100644
index 0000000..2c4f02c
--- /dev/null
+++ b/xos/configurations/acord/openstack_ceilometer_patch.tar.gz
Binary files differ
diff --git a/xos/configurations/acord/xos_cord_config b/xos/configurations/acord/xos_cord_config
new file mode 100644
index 0000000..a5448f7
--- /dev/null
+++ b/xos/configurations/acord/xos_cord_config
@@ -0,0 +1,6 @@
+[gui]
+branding_name=CORD
+#branding_css=/static/cord.css
+branding_icon=/static/cord-logo.png
+branding_favicon=/static/cord-favicon.png
+branding_bg=/static/cord-bg.jpg
diff --git a/xos/configurations/common/devstack/local.conf b/xos/configurations/common/devstack/local.conf
index dfcf07b..38cd20c 100644
--- a/xos/configurations/common/devstack/local.conf
+++ b/xos/configurations/common/devstack/local.conf
@@ -4,6 +4,8 @@
DOWNLOAD_DEFAULT_IMAGES=false
IMAGE_URLS="http://www.planet-lab.org/cord/trusty-server-multi-nic.img"
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
+# Append the git branch name if you wish to download ceilometer from a specific branch
+enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer
disable_service n-net
enable_service q-svc
@@ -14,5 +16,16 @@
# Optional, to enable tempest configuration as part of devstack
enable_service tempest
+# Uncomment below lines if you are installing kilo version of ceilometer
+#enable_service ceilometer-acentral
+#enable_service ceilometer-anotification
+#enable_service ceilometer-collector
+#enable_service ceilometer-alarm-singleton
+#enable_service ceilometer-alarm-notifier
+#enable_service ceilometer-alarm-evaluator
+#enable_service ceilometer-api
+#enable_service ceilometer-acompute
+CEILOMETER_BACKEND=mongodb
+
## Neutron options
Q_USE_SECGROUP=False
diff --git a/xos/configurations/common/xos_common_config b/xos/configurations/common/xos_common_config
index f7b335e..76ba747 100644
--- a/xos/configurations/common/xos_common_config
+++ b/xos/configurations/common/xos_common_config
@@ -37,6 +37,7 @@
images_directory=/opt/xos/images
dependency_graph=/opt/xos/model-deps
logfile=/var/log/xos_backend.log
+save_ansible_output=True
[gui]
disable_minidashboard=True
diff --git a/xos/configurations/cord-pod/README.md b/xos/configurations/cord-pod/README.md
index 1824ab6..c6511f7 100644
--- a/xos/configurations/cord-pod/README.md
+++ b/xos/configurations/cord-pod/README.md
@@ -37,7 +37,7 @@
To bring up ONOS in this VM, log into the head node and run:
```
$ ssh ubuntu@onos-cord
-ubuntu@onos-cord:~$ cd cord; docker-compose up -d
+ubuntu@onos-cord:~$ cd cord; sudo docker-compose up -d
```
Currently it's also necessary to do some manual configuration on each compute
diff --git a/xos/configurations/cord-pod/vtn-external.yaml b/xos/configurations/cord-pod/vtn-external.yaml
index 315fc20..0aaee67 100644
--- a/xos/configurations/cord-pod/vtn-external.yaml
+++ b/xos/configurations/cord-pod/vtn-external.yaml
@@ -24,7 +24,7 @@
node: service_ONOS_VTN
relationship: tosca.relationships.TenantOfService
properties:
- dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp, org.onosproject.openstackswitching, org.onosproject.cordvtn, org.onosproject.olt, org.onosproject.igmp, org.onosproject.cordmcast
+ dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp, org.onosproject.cordvtn, org.onosproject.olt, org.onosproject.igmp, org.onosproject.cordmcast
rest_onos/v1/network/configuration/: { get_artifact: [ SELF, vtn_network_cfg_json, LOCAL_FILE ] }
artifacts:
vtn_network_cfg_json: /root/setup/vtn-network-cfg.json
diff --git a/xos/configurations/cord/dataplane/cleanup.sh b/xos/configurations/cord/dataplane/cleanup.sh
index 120454d..91d821c 100755
--- a/xos/configurations/cord/dataplane/cleanup.sh
+++ b/xos/configurations/cord/dataplane/cleanup.sh
@@ -28,7 +28,7 @@
cleanup_network lan_network
cleanup_network wan_network
-cleanup_network mysite_vcpe-private
+cleanup_network mysite_vsg-private
cleanup_network mysite_vsg-access
cleanup_network management
diff --git a/xos/configurations/cord/dataplane/gen-etc-hosts.sh b/xos/configurations/cord/dataplane/gen-etc-hosts.sh
index 6c07ef9..0d49706 100755
--- a/xos/configurations/cord/dataplane/gen-etc-hosts.sh
+++ b/xos/configurations/cord/dataplane/gen-etc-hosts.sh
@@ -15,5 +15,5 @@
$( get_ip mysite_onos_volt flat-lan-1-net) onos_volt
$( get_ip mysite_volt flat-lan-1-net) switch_volt
$( get_ip mysite_clients flat-lan-1-net) client
-$( get_ip mysite_vcpe flat-lan-1-net) vcpe
+$( get_ip mysite_vsg flat-lan-1-net) vcpe
EOF
diff --git a/xos/configurations/cord/dataplane/gen-inventory.sh b/xos/configurations/cord/dataplane/gen-inventory.sh
index 74a5ac8..bacd2dd 100755
--- a/xos/configurations/cord/dataplane/gen-inventory.sh
+++ b/xos/configurations/cord/dataplane/gen-inventory.sh
@@ -17,5 +17,5 @@
switch_volt ansible_ssh_host=$( get_ip mysite_volt flat-lan-1-net) subscriber_ip=$( get_ip mysite_volt subscriber_network) lan_ip=$( get_ip mysite_volt lan_network)
client ansible_ssh_host=$( get_ip mysite_clients flat-lan-1-net) subscriber_ip=$( get_ip mysite_clients subscriber_network)
-vcpe ansible_ssh_host=$( get_ip mysite_vcpe flat-lan-1-net) lan_ip=$( get_ip mysite_vcpe lan_network)
+vcpe ansible_ssh_host=$( get_ip mysite_vsg flat-lan-1-net) lan_ip=$( get_ip mysite_vsg lan_network)
EOF
diff --git a/xos/configurations/opencloud/cdn-syndicate-content.yaml b/xos/configurations/opencloud/cdn-syndicate-content.yaml
new file mode 100644
index 0000000..06dc623
--- /dev/null
+++ b/xos/configurations/opencloud/cdn-syndicate-content.yaml
@@ -0,0 +1,52 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Template for deploying a single server with predefined properties.
+
+imports:
+ - custom_types/xos.yaml
+ - custom_types/cdn.yaml
+
+topology_template:
+ node_templates:
+ HyperCache:
+ type: tosca.nodes.CDNService
+ properties:
+ # HyperCache service must already exist before running this recipe
+ no-create: true
+ no-delete: true
+ no-update: true
+
+ # Setup the Syndicate Devel Service Provider
+
+ main_service_provider:
+ type: tosca.nodes.ServiceProvider
+ requirements:
+ - hpc_service:
+ node: HyperCache
+ relationship: tosca.relationships.MemberOfService
+
+ syndicate_devel:
+ type: tosca.nodes.ContentProvider
+ requirements:
+ - service_provider:
+ node: main_service_provider
+ relationship: tosca.relationships.MemberOfServiceProvider
+
+# http_node2.cs.arizona.edu:
+# type: tosca.nodes.OriginServer
+# requirements:
+# - content_provider:
+# node: syndicate_devel
+# relationship: tosca.relationships.MemberOfContentProvider
+
+ syndicate-devel.opencloud.us:
+ type: tosca.nodes.CDNPrefix
+ requirements:
+ - content_provider:
+ node: syndicate_devel
+ relationship: tosca.relationships.MemberOfContentProvider
+
+# - default_origin_server:
+# node: http_node2.cs.arizona.edu
+# relationship: tosca.relationships.DefaultOriginServer
+
diff --git a/xos/configurations/vtn/vtn.yaml b/xos/configurations/vtn/vtn.yaml
index 9b36852..3928ba1 100644
--- a/xos/configurations/vtn/vtn.yaml
+++ b/xos/configurations/vtn/vtn.yaml
@@ -58,7 +58,7 @@
node: service_ONOS_VTN
relationship: tosca.relationships.TenantOfService
properties:
- dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.lldpprovider, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp, org.onosproject.openstackswitching, org.onosproject.cordvtn
+ dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.lldpprovider, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp, org.onosproject.cordvtn
rest_onos/v1/network/configuration/: { get_artifact: [ SELF, vtn_network_cfg_json, LOCAL_FILE ] }
artifacts:
vtn_network_cfg_json: /root/setup/vtn-network-cfg.json
diff --git a/xos/services/ceilometer/models.py b/xos/services/ceilometer/models.py
index 2684097..65bffef 100644
--- a/xos/services/ceilometer/models.py
+++ b/xos/services/ceilometer/models.py
@@ -35,7 +35,7 @@
proxy = True
KIND = CEILOMETER_KIND
- LOOK_FOR_IMAGES=[ "trusty-server-multi-nic-docker", # CloudLab
+ LOOK_FOR_IMAGES=[ #"trusty-server-multi-nic-docker", # CloudLab
"trusty-server-multi-nic",
]
diff --git a/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2 b/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
index ea5b639..a0ebb0c 100755
--- a/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
+++ b/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
@@ -24,9 +24,9 @@
sudo docker pull srikanthvavila/monitoring-channel
if [ -z "$HEADNODEFLATLANIP" ] || [ "$HEADNODEFLATLANIP" == "None" ]
then
- docker run -d --name=$MONITORING_CHANNEL --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 srikanthvavila/monitoring-channel
+ docker run -d --name=$MONITORING_CHANNEL --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 -v /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config:/usr/local/share/ceilometer_proxy_config srikanthvavila/monitoring-channel
else
- docker run -d --name=$MONITORING_CHANNEL --add-host="ctl:$HEADNODEFLATLANIP" --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 srikanthvavila/monitoring-channel
+ docker run -d --name=$MONITORING_CHANNEL --add-host="ctl:$HEADNODEFLATLANIP" --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 -v /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config:/usr/local/share/ceilometer_proxy_config srikanthvavila/monitoring-channel
fi
else
docker start $MONITORING_CHANNEL
@@ -40,7 +40,7 @@
#ifconfig $HPC_IFACE 0.0.0.0
# Now copy ceilometer proxy configuration to container
-cat /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config | docker exec -i $MONITORING_CHANNEL bash -c 'cat > /usr/local/share/ceilometer_proxy_config'
+#cat /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config | sudo docker exec -i $MONITORING_CHANNEL bash -c 'cat > /usr/local/share/ceilometer_proxy_config'
# Attach to container
docker start -a $MONITORING_CHANNEL
diff --git a/xos/tools/apigen/modelgen b/xos/tools/apigen/modelgen
index 72cce08..414540d 100644
--- a/xos/tools/apigen/modelgen
+++ b/xos/tools/apigen/modelgen
@@ -17,6 +17,7 @@
options = None
+
def singular(foo, keys):
for k in keys:
if (foo==k+'es'):
@@ -28,8 +29,11 @@
g = globals()
def enum_classes(apps):
+ global app_map
+ app_map = {}
model_classes = []
for app in apps:
+ orig_app=app
app = app + ".models"
models_module = __import__(app)
for part in app.split(".")[1:]:
@@ -37,12 +41,15 @@
break
models_module = getattr(models_module,part)
+ global PlCoreBase
PlCoreBase = getattr(models_module,"PlCoreBase")
for classname in dir(models_module):
c = getattr(models_module, classname, None)
if type(c)==type(PlCoreBase) and c.__name__ not in options.blacklist:
model_classes.append(c)
+ app_map[c.__name__]=orig_app
+
return model_classes
@@ -53,6 +60,8 @@
def __init__(self, m):
self.model = m
self.props = []
+ self.fields = []
+ self.field_dict = []
self.refs = []
self.plural_name = None
@@ -101,11 +110,19 @@
return filtered
def add_object(self, o):
+ global app_map
obj = GenObj(o)
fields = o._meta.fields
+ try:
+ obj.app = app_map[o.__name__]
+ except KeyError:
+ print "KeyError: %r"%o.__name__
+ pdb.set_trace()
self[str(obj).lower()]=obj
def compute_links(self):
+ base_props = [f.name for f in PlCoreBase._meta.fields]
+
for obj in self.values():
#if (str(obj)=='network'):
# pdb.set_trace()
@@ -132,7 +149,11 @@
# cause swagger and REST to break
pass
else:
- obj.props.append(f.name)
+ f.type = f.__class__.__name__
+
+ if (f.name not in base_props):
+ obj.fields.append(f)
+ obj.props.append(f.name)
m2m = obj.model._meta.many_to_many
for f in m2m:
diff --git a/xos/xos/settings.py b/xos/xos/settings.py
index 1cec43f..a35e487 100644
--- a/xos/xos/settings.py
+++ b/xos/xos/settings.py
@@ -210,13 +210,23 @@
}
},
'handlers': {
+ 'file': {
+ 'level': 'DEBUG',
+ 'class': 'logging.FileHandler',
+ 'filename': '/var/log/django_debug.log',
+ },
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
- }
+ },
},
'loggers': {
+ 'django': {
+ 'handlers': ['file'],
+ 'level': 'DEBUG',
+ 'propagate': True,
+ },
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',