diff --git a/etc/valet/api/config.py b/etc/valet/api/config.py index 4850962..239f31d 100644 --- a/etc/valet/api/config.py +++ b/etc/valet/api/config.py @@ -1,14 +1,18 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 oslo_config import cfg from pecan.hooks import TransactionHook from valet.api.db import models diff --git a/etc/valet/openstack/notification_listener/notification_listener.py b/etc/valet/openstack/notification_listener/notification_listener.py index 5532e8f..e63d6fd 100644 --- a/etc/valet/openstack/notification_listener/notification_listener.py +++ b/etc/valet/openstack/notification_listener/notification_listener.py @@ -1,14 +1,18 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 from oslo_config import cfg import oslo_messaging diff --git a/setup.py b/setup.py index fd309f1..f2a4562 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/api/app.py b/valet/api/app.py index a51c23d..227d284 100644 --- a/valet/api/app.py +++ b/valet/api/app.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/common/compute.py b/valet/api/common/compute.py index b0a3622..e1a289c 100644 --- a/valet/api/common/compute.py +++ b/valet/api/common/compute.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/common/hooks.py b/valet/api/common/hooks.py index 16a67e9..d9b5c9b 100644 --- a/valet/api/common/hooks.py +++ b/valet/api/common/hooks.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/common/i18n.py b/valet/api/common/i18n.py index 87e7508..29d0f1b 100644 --- a/valet/api/common/i18n.py +++ b/valet/api/common/i18n.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/common/identity.py b/valet/api/common/identity.py index 8dd4b58..d2d1317 100644 --- a/valet/api/common/identity.py +++ b/valet/api/common/identity.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. @@ -21,9 +18,7 @@ from datetime import datetime import iso8601 -# https://github.com/openstack/python-keystoneclient/blob/ -# master/keystoneclient/v2_0/client.py -# import keystoneauth1.exceptions + from keystoneauth1.identity import v2 from keystoneauth1 import session from keystoneclient.v2_0 import client diff --git a/valet/api/common/identity.py.save b/valet/api/common/identity.py.save index 2fe871d..3807998 100644 --- a/valet/api/common/identity.py.save +++ b/valet/api/common/identity.py.save @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/common/messaging.py b/valet/api/common/messaging.py index 3244aaf..b768c0f 100644 --- a/valet/api/common/messaging.py +++ b/valet/api/common/messaging.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/common/ostro_helper.py b/valet/api/common/ostro_helper.py index b68217b..3b6b577 100644 --- a/valet/api/common/ostro_helper.py +++ b/valet/api/common/ostro_helper.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/conf.py b/valet/api/conf.py index 176ca99..69a565e 100644 --- a/valet/api/conf.py +++ b/valet/api/conf.py @@ -1,14 +1,18 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 oslo_config import cfg diff --git a/valet/api/db/models/music/groups.py b/valet/api/db/models/music/groups.py index 623716c..33b5dec 100644 --- a/valet/api/db/models/music/groups.py +++ b/valet/api/db/models/music/groups.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/db/models/music/music.py b/valet/api/db/models/music/music.py index 652b83c..97f37cf 100644 --- a/valet/api/db/models/music/music.py +++ b/valet/api/db/models/music/music.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. @@ -143,8 +140,6 @@ class Music(object): '''Creates a keyspace.''' data = { 'replicationInfo': { - # 'class': 'NetworkTopologyStrategy', - # 'dc1': self.replication_factor, 'class': 'SimpleStrategy', 'replication_factor': self.replication_factor, }, diff --git a/valet/api/db/models/music/ostro.py b/valet/api/db/models/music/ostro.py index fd0aa07..56062e6 100644 --- a/valet/api/db/models/music/ostro.py +++ b/valet/api/db/models/music/ostro.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/db/models/music/placements.py b/valet/api/db/models/music/placements.py index d329d33..701a238 100644 --- a/valet/api/db/models/music/placements.py +++ b/valet/api/db/models/music/placements.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/db/models/music/plans.py b/valet/api/db/models/music/plans.py index bd70f75..fcbe1b1 100644 --- a/valet/api/db/models/music/plans.py +++ b/valet/api/db/models/music/plans.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/v1/commands/populate.py b/valet/api/v1/commands/populate.py index 606580c..6bb063c 100644 --- a/valet/api/v1/commands/populate.py +++ b/valet/api/v1/commands/populate.py @@ -1,25 +1,21 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. '''Populate command''' from pecan.commands.base import BaseCommand -# from pecan import conf from valet.api.common.i18n import _ from valet.api.conf import register_conf, set_domain @@ -52,7 +48,6 @@ class PopulateCommand(BaseCommand): models.start() # FIXME: There's no create_all equivalent for Music. - # models.Base.metadata.create_all(conf.sqlalchemy.engine) # Valet Group.create_table() diff --git a/valet/api/v1/controllers/errors.py b/valet/api/v1/controllers/errors.py index 3be5957..794dfde 100644 --- a/valet/api/v1/controllers/errors.py +++ b/valet/api/v1/controllers/errors.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/v1/controllers/groups.py b/valet/api/v1/controllers/groups.py index 7cb5440..d189af4 100644 --- a/valet/api/v1/controllers/groups.py +++ b/valet/api/v1/controllers/groups.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/v1/controllers/placements.py b/valet/api/v1/controllers/placements.py index 599f1bb..7862630 100644 --- a/valet/api/v1/controllers/placements.py +++ b/valet/api/v1/controllers/placements.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/v1/controllers/plans.py b/valet/api/v1/controllers/plans.py index e9ed7a0..839a182 100644 --- a/valet/api/v1/controllers/plans.py +++ b/valet/api/v1/controllers/plans.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/v1/controllers/root.py b/valet/api/v1/controllers/root.py index 47ef2a5..bdd5645 100644 --- a/valet/api/v1/controllers/root.py +++ b/valet/api/v1/controllers/root.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/v1/controllers/status.py b/valet/api/v1/controllers/status.py index 76924e1..e86baf5 100644 --- a/valet/api/v1/controllers/status.py +++ b/valet/api/v1/controllers/status.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. @@ -46,12 +43,10 @@ class StatusController(object): '''Ping each subsystem.''' ostro_response = StatusController._ping_ostro() # TODO(JD): Ping Music plus any others. - # music_response = StatusController._ping_music() response = { "status": { "ostro": ostro_response, - # "music": music_response, } } diff --git a/valet/api/v1/controllers/v1.py b/valet/api/v1/controllers/v1.py index 8262446..05588ca 100644 --- a/valet/api/v1/controllers/v1.py +++ b/valet/api/v1/controllers/v1.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/api/wsgi.py b/valet/api/wsgi.py index bc3be8a..c9632ff 100644 --- a/valet/api/wsgi.py +++ b/valet/api/wsgi.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. @@ -45,8 +42,6 @@ if __name__ == '__main__': from wsgiref.simple_server import make_server # disable=C0411,C0413 # TODO(JD): At some point, it would be nice to use pecan_mount - # import pecan_mount - # HTTPD = make_server('', 8090, pecan_mount.tree) from valet.api.conf import register_conf, set_domain register_conf() set_domain() diff --git a/valet/cli/groupcli.py b/valet/cli/groupcli.py index c58352e..beb4b6a 100644 --- a/valet/cli/groupcli.py +++ b/valet/cli/groupcli.py @@ -1,14 +1,18 @@ -# 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 2014-2017 AT&T Intellectual Property +# +# 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 oslo_config import cfg @@ -113,7 +117,6 @@ def cmd_details(args): def get_token(timeout, args): - # tenant_name = args.os_tenant_name if args.os_tenant_name else os.environ.get('OS_TENANT_NAME') tenant_name = args.os_tenant_name if args.os_tenant_name else CONF.identity.project_name auth_name = args.os_username if args.os_username else CONF.identity.username password = args.os_password if args.os_password else CONF.identity.password @@ -141,7 +144,6 @@ def get_token(timeout, args): return resp.json()['access']['token']['id'] except Exception as e: message = 'Failed in get_token' - # logger.log_exception(message, str(e)) print(e) raise ConnectionError(message) diff --git a/valet/cli/valetcli.py b/valet/cli/valetcli.py index 3c26f4c..a925b04 100755 --- a/valet/cli/valetcli.py +++ b/valet/cli/valetcli.py @@ -1,14 +1,18 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 sys import valet.cli.groupcli as groupcli diff --git a/valet/engine/conf.py b/valet/engine/conf.py index 5692fa1..af66ba1 100644 --- a/valet/engine/conf.py +++ b/valet/engine/conf.py @@ -1,14 +1,18 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 oslo_config import cfg from valet.api import conf as api diff --git a/valet/engine/listener/listener_manager.py b/valet/engine/listener/listener_manager.py index d12d401..25e2b6f 100644 --- a/valet/engine/listener/listener_manager.py +++ b/valet/engine/listener/listener_manager.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2015-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Nov 29, 2016 - -@author: stack -''' +# 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 datetime import datetime import json diff --git a/valet/engine/listener/oslo_messages.py b/valet/engine/listener/oslo_messages.py index 71230f3..42bca0f 100644 --- a/valet/engine/listener/oslo_messages.py +++ b/valet/engine/listener/oslo_messages.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2015-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/engine/optimizer/app_manager/app_handler.py b/valet/engine/optimizer/app_manager/app_handler.py index ba545af..2aecef0 100755 --- a/valet/engine/optimizer/app_manager/app_handler.py +++ b/valet/engine/optimizer/app_manager/app_handler.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 - +# 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 @@ -100,8 +100,6 @@ class AppHandler(object): if isinstance(v, VM): self.apps[v.app_uuid].add_vm(v, _placement_map[v]) - # elif isinstance(v, Volume): - # self.apps[v.app_uuid].add_volume(v, _placement_map[v]) else: if _placement_map[v] in self.resource.hosts.keys(): host = self.resource.hosts[_placement_map[v]] @@ -122,7 +120,7 @@ class AppHandler(object): self.resource.datacenter.name, self.last_log_index) self.last_log_index = last_index - # TODO(GJ): error handling + # TODO: error handling logging = open(self.config.app_log_loc + app_logfile, mode) diff --git a/valet/engine/optimizer/app_manager/app_topology.py b/valet/engine/optimizer/app_manager/app_topology.py index eb6eafd..9e08a17 100755 --- a/valet/engine/optimizer/app_manager/app_topology.py +++ b/valet/engine/optimizer/app_manager/app_topology.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 22, 2016 - +# 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 valet.engine.optimizer.app_manager.app_topology_base import VM, VGroup from valet.engine.optimizer.app_manager.app_topology_parser import Parser diff --git a/valet/engine/optimizer/app_manager/app_topology_base.py b/valet/engine/optimizer/app_manager/app_topology_base.py index e75e877..e0dedcb 100755 --- a/valet/engine/optimizer/app_manager/app_topology_base.py +++ b/valet/engine/optimizer/app_manager/app_topology_base.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 22, 2016 - +# 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. LEVELS = ["host", "rack", "cluster"] @@ -37,8 +37,7 @@ class VGroup(object): self.exclusivity_groups = {} # over this level. key=name, value=level self.availability_zone_list = [] - # self.host_aggregates = {} # cumulative aggregates - self.extra_specs_list = [] # cumulative extra_specs + self.extra_specs_list = [] # cumulative extra_specs self.vCPUs = 0 self.mem = 0 # MB @@ -80,7 +79,6 @@ class VGroup(object): 'diversity_groups': self.diversity_groups, 'exclusivity_groups': self.exclusivity_groups, 'availability_zones': self.availability_zone_list, - # 'host_aggregates':host_aggregates, 'extra_specs_list': self.extra_specs_list, 'cpus': self.vCPUs, 'mem': self.mem, @@ -114,7 +112,6 @@ class VM(object): self.exclusivity_groups = {} self.availability_zone = None - # self.host_aggregates = {} self.extra_specs_list = [] self.flavor = None @@ -160,7 +157,6 @@ class VM(object): 'diversity_groups': self.diversity_groups, 'exclusivity_groups': self.exclusivity_groups, 'availability_zones': availability_zone, - # 'host_aggregates':host_aggregates, 'extra_specs_list': self.extra_specs_list, 'flavor': self.flavor, 'cpus': self.vCPUs, diff --git a/valet/engine/optimizer/app_manager/app_topology_parser.py b/valet/engine/optimizer/app_manager/app_topology_parser.py index d9e577a..92de5d3 100755 --- a/valet/engine/optimizer/app_manager/app_topology_parser.py +++ b/valet/engine/optimizer/app_manager/app_topology_parser.py @@ -1,16 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 +# 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 valet.engine.optimizer.app_manager.app_topology_base import VGroup, VGroupLink, VM, VMLink, LEVELS @@ -598,22 +599,6 @@ class Parser(object): if tvk == voll.node.uuid: self._add_io_link(voll, _vgroup) break - # elif isinstance(svg, Volume): - # for vml in svg.vm_list: - # found = False - # for _, tvgroup in _vgroups.iteritems(): - # containing_vg_uuid = self._exist_in_subgroups(vml.node.uuid, tvgroup) - # if containing_vg_uuid is not None: - # found = True - # if containing_vg_uuid != _vgroup.uuid and \ - # self._exist_in_subgroups(containing_vg_uuid, _vgroup) is None: - # self._add_io_link(vml, _vgroup) - # break - # if found is False: - # for tvk in _vms.keys(): - # if tvk == vml.node.uuid: - # self._add_io_link(vml, _vgroup) - # break elif isinstance(svg, VGroup): self._set_vgroup_links(svg, _vgroups, _vms, _volumes) diff --git a/valet/engine/optimizer/app_manager/application.py b/valet/engine/optimizer/app_manager/application.py index dc81b72..23e98b8 100755 --- a/valet/engine/optimizer/app_manager/application.py +++ b/valet/engine/optimizer/app_manager/application.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Feb. 9, 2016 - +# 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. class App(object): diff --git a/valet/engine/optimizer/db_connect/configuration.py b/valet/engine/optimizer/db_connect/configuration.py index 3876040..84a6b3a 100644 --- a/valet/engine/optimizer/db_connect/configuration.py +++ b/valet/engine/optimizer/db_connect/configuration.py @@ -1,25 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - - -################################################################################################################# -# Author: Gueyoung Jung -# Contact: gjung@research.att.com -# Version 2.0.2: Feb. 9, 2016 -# -# Functions -# -################################################################################################################# - +# 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 diff --git a/valet/engine/optimizer/db_connect/event.py b/valet/engine/optimizer/db_connect/event.py index a7c26e0..8d1c957 100644 --- a/valet/engine/optimizer/db_connect/event.py +++ b/valet/engine/optimizer/db_connect/event.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Feb. 9, 2016 - +# 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 diff --git a/valet/engine/optimizer/db_connect/music_handler.py b/valet/engine/optimizer/db_connect/music_handler.py index bd9a831..493bb17 100644 --- a/valet/engine/optimizer/db_connect/music_handler.py +++ b/valet/engine/optimizer/db_connect/music_handler.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 - +# 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 operator @@ -235,13 +235,6 @@ class MusicHandler(object): if self.delete_event(event_id) is False: return None continue - ''' - else: - filter_properties = args['filter_properties'] - if 'scheduler_hints' not in filter_properties.keys(): - self.delete_event(event_id) - continue - ''' if 'instance' not in args.keys(): if self.delete_event(event_id) is False: @@ -280,13 +273,6 @@ class MusicHandler(object): self.logger.warn("MusicHandler.get_events: data missing in compute object event") elif e.method == "build_and_run_instance": - ''' - if e.heat_resource_name == None or e.heat_resource_name == "none" or \ - e.heat_resource_uuid == None or e.heat_resource_uuid == "none" or \ - e.heat_root_stack_id == None or e.heat_root_stack_id == "none" or \ - e.heat_stack_name == None or e.heat_stack_name == "none" or \ - e.uuid == None or e.uuid == "none": - ''' if e.uuid is None or e.uuid == "none": error_event_list.append(e) self.logger.warn("MusicHandler.get_events: data missing in build event") @@ -353,12 +339,6 @@ class MusicHandler(object): self.logger.info("MusicHandler.put_uuid: uuid (" + _e.uuid + ") added") - ''' - self.delete_event(_e.event_id) - - self.logger.info("db: build event (" + _e.event_id + ") deleted") - ''' - return True def delete_uuid(self, _k): @@ -603,7 +583,7 @@ class MusicHandler(object): return json_app - # TODO(GY): get all other VMs related to this VM + # TODO: get all other VMs related to this VM def get_vm_info(self, _s_uuid, _h_uuid, _host): updated = False json_app = {} @@ -629,7 +609,7 @@ class MusicHandler(object): vm["planned_host"] = vm["host"] vm["host"] = _host self.logger.warn("db: conflicted placement decision from Ostro") - # TODO(GY): affinity, diversity, exclusivity validation check + # TODO: affinity, diversity, exclusivity validation check updated = True else: self.logger.debug("db: placement as expected") @@ -689,24 +669,3 @@ class MusicHandler(object): return False return True - - -# Unit test -''' -if __name__ == '__main__': - config = Config() - config_status = config.configure() - if config_status != "success": - print "Error while configuring Client: " + config_status - sys.exit(2) - - mh = MusicHandler(config, None) - event_list = mh.get_events() - for e in event_list: - print "event id = ", e.event_id - print "host = ", e.host - print "least disk = ", e.disk_available_least - print "disk = ", e.local_disk - for nc in e.numa_cell_list: - print "numa cell = ", nc -''' diff --git a/valet/engine/optimizer/ostro/constraint_solver.py b/valet/engine/optimizer/ostro/constraint_solver.py index b4d5b94..ae0a017 100755 --- a/valet/engine/optimizer/ostro/constraint_solver.py +++ b/valet/engine/optimizer/ostro/constraint_solver.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 - +# 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 valet.engine.optimizer.app_manager.app_topology_base import VGroup, VM, LEVELS from valet.engine.optimizer.ostro.openstack_filters import AggregateInstanceExtraSpecsFilter diff --git a/valet/engine/optimizer/ostro/openstack_filters.py b/valet/engine/optimizer/ostro/openstack_filters.py index 663458d..18c504a 100755 --- a/valet/engine/optimizer/ostro/openstack_filters.py +++ b/valet/engine/optimizer/ostro/openstack_filters.py @@ -1,16 +1,18 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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. -# Modified: Mar. 15, 2016 import six from valet.engine.optimizer.app_manager.app_topology_base import VM @@ -121,7 +123,6 @@ class AvailabilityZoneFilter(object): if len(az_request_list) == 0: return True - # metadatas = openstack_utils.aggregate_metadata_get_by_host(_level, _host, key='availability_zone') availability_zone_list = openstack_utils.availability_zone_get_by_host(_level, _host) for azr in az_request_list: @@ -131,24 +132,6 @@ class AvailabilityZoneFilter(object): return True - ''' if 'availability_zone' in metadata: - - hosts_passes = availability_zone in metadata['availability_zone'] - host_az = metadata['availability_zone'] - else: - hosts_passes = availability_zone == CONF.default_availability_zone - host_az = CONF.default_availability_zone - - if not hosts_passes: - LOG.debug("Availability Zone '%(az)s' requested. " - "%(host_state)s has AZs: %(host_az)s", - {'host_state': host_state, - 'az': availability_zone, - 'host_az': host_az}) - - return hosts_passes - ''' - class RamFilter(object): @@ -158,8 +141,6 @@ class RamFilter(object): def host_passes(self, _level, _host, _v): """Only return hosts with sufficient available RAM.""" requested_ram = _v.mem # MB - # free_ram_mb = host_state.free_ram_mb - # total_usable_ram_mb = host_state.total_usable_ram_mb (total_ram, usable_ram) = _host.get_mem(_level) # Do not allow an instance to overcommit against itself, only against other instances. @@ -168,19 +149,11 @@ class RamFilter(object): str(total_ram) + ") in host (" + _host.get_resource_name(_level) + ")") return False - # ram_allocation_ratio = self._get_ram_allocation_ratio(host_state, spec_obj) - - # m emory_mb_limit = total_usable_ram_mb * ram_allocation_ratio - # used_ram_mb = total_usable_ram_mb - free_ram_mb - # usable_ram = memory_mb_limit - used_ram_mb - if not usable_ram >= requested_ram: self.logger.debug("requested mem (" + str(requested_ram) + ") more than avail mem (" + str(usable_ram) + ") in host (" + _host.get_resource_name(_level) + ")") return False - # save oversubscription limit for compute node to test against: - # host_state.limits['memory_mb'] = memory_mb_limit return True @@ -192,23 +165,8 @@ class CoreFilter(object): def host_passes(self, _level, _host, _v): """Return True if host has sufficient CPU cores.""" (vCPUs, avail_vCPUs) = _host.get_vCPUs(_level) - ''' if avail_vcpus == 0: - - Fail safe - LOG.warning(_LW("VCPUs not set; assuming CPU collection broken")) - return True - ''' instance_vCPUs = _v.vCPUs - # cpu_allocation_ratio = self._get_cpu_allocation_ratio(host_state, spec_obj) - # vcpus_total = host_state.vcpus_total * cpu_allocation_ratio - - # Only provide a VCPU limit to compute if the virt driver is reporting - # an accurate count of installed VCPUs. (XenServer driver does not) - ''' - if vcpus_total > 0: - host_state.limits['vcpu'] = vcpus_total - ''' # Do not allow an instance to overcommit against itself, only against other instances. if instance_vCPUs > vCPUs: @@ -216,7 +174,6 @@ class CoreFilter(object): str(vCPUs) + ") in host (" + _host.get_resource_name(_level) + ")") return False - # free_vcpus = vcpus_total - host_state.vcpus_used if avail_vCPUs < instance_vCPUs: self.logger.debug("requested vCPUs (" + str(instance_vCPUs) + ") more than avail vCPUs (" + str(avail_vCPUs) + ") in host (" + _host.get_resource_name(_level) + ")") @@ -232,24 +189,12 @@ class DiskFilter(object): def host_passes(self, _level, _host, _v): """Filter based on disk usage.""" - # requested_disk = (1024 * (spec_obj.root_gb + spec_obj.ephemeral_gb) + spec_obj.swap) requested_disk = _v.local_volume_size (_, usable_disk) = _host.get_local_disk(_level) - # free_disk_mb = host_state.free_disk_mb - # total_usable_disk_mb = host_state.total_usable_disk_gb * 1024 - - # disk_allocation_ratio = self._get_disk_allocation_ratio(host_state, spec_obj) - - # disk_mb_limit = total_usable_disk_mb * disk_allocation_ratio - # used_disk_mb = total_usable_disk_mb - free_disk_mb - # usable_disk_mb = disk_mb_limit - used_disk_mb - if not usable_disk >= requested_disk: self.logger.debug("requested disk (" + str(requested_disk) + ") more than avail disk (" + str(usable_disk) + ") in host (" + _host.get_resource_name(_level) + ")") return False - # disk_gb_limit = disk_mb_limit / 1024 - # host_state.limits['disk_gb'] = disk_gb_limit return True diff --git a/valet/engine/optimizer/ostro/openstack_utils.py b/valet/engine/optimizer/ostro/openstack_utils.py index 8ab1986..f3743dd 100755 --- a/valet/engine/optimizer/ostro/openstack_utils.py +++ b/valet/engine/optimizer/ostro/openstack_utils.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Mar. 15, 2016 - +# 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 collections import operator diff --git a/valet/engine/optimizer/ostro/optimizer.py b/valet/engine/optimizer/ostro/optimizer.py index 760c212..2e10bb9 100755 --- a/valet/engine/optimizer/ostro/optimizer.py +++ b/valet/engine/optimizer/ostro/optimizer.py @@ -1,16 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 +# 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 time diff --git a/valet/engine/optimizer/ostro/ostro.py b/valet/engine/optimizer/ostro/ostro.py index 46b9a36..dc6ce8c 100755 --- a/valet/engine/optimizer/ostro/ostro.py +++ b/valet/engine/optimizer/ostro/ostro.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Oct. 1, 2016 - +# 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 oslo_config import cfg import threading @@ -76,10 +76,6 @@ class Ostro(object): self.thread_list.append(self.compute) self.thread_list.append(self.listener) - ''' for monitoring test ''' - # duration = 30.0 - # expired = time.time() + duration - while self.end_of_process is False: time.sleep(1) @@ -97,12 +93,6 @@ class Ostro(object): if self.place_app(request_list) is False: break - ''' for monitoring test ''' - # current = time.time() - # if current > expired: - # self.logger.debug("test: ostro running ......") - # expired = current + duration - self.topology.end_of_process = True self.compute.end_of_process = True @@ -278,7 +268,7 @@ class Ostro(object): break for vm_id in vm_id_list: - if vm_id[2] != "none": # if physical_uuid != 'none' + if vm_id[2] != "none": vm_list.append(vm_id[2]) return vm_list diff --git a/valet/engine/optimizer/ostro/search.py b/valet/engine/optimizer/ostro/search.py index 9264464..e0b282f 100755 --- a/valet/engine/optimizer/ostro/search.py +++ b/valet/engine/optimizer/ostro/search.py @@ -1,16 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 +# 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 copy import operator diff --git a/valet/engine/optimizer/ostro/search_base.py b/valet/engine/optimizer/ostro/search_base.py index 9089a0b..099d500 100755 --- a/valet/engine/optimizer/ostro/search_base.py +++ b/valet/engine/optimizer/ostro/search_base.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 22, 2016 - +# 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 valet.engine.optimizer.app_manager.app_topology_base import VGroup, VM, Volume, LEVELS diff --git a/valet/engine/optimizer/ostro_server/configuration.py b/valet/engine/optimizer/ostro_server/configuration.py index a68dc0a..c174a1b 100755 --- a/valet/engine/optimizer/ostro_server/configuration.py +++ b/valet/engine/optimizer/ostro_server/configuration.py @@ -1,24 +1,19 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -################################################################################################################# -# Author: Gueyoung Jung -# Contact: gjung@research.att.com -# Version 2.0.2: Feb. 9, 2016 -# Modified: Sep. 16, 2016 -# -# Functions +# 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. + # - Set all configurations to run Ostro -# -################################################################################################################# import os from oslo_config import cfg diff --git a/valet/engine/optimizer/ostro_server/daemon.py b/valet/engine/optimizer/ostro_server/daemon.py index 7a61a38..e4f14ac 100644 --- a/valet/engine/optimizer/ostro_server/daemon.py +++ b/valet/engine/optimizer/ostro_server/daemon.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Mar. 1, 2016 - +# 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 atexit import os diff --git a/valet/engine/optimizer/ostro_server/db_cleaner.py b/valet/engine/optimizer/ostro_server/db_cleaner.py index 865508f..3c21680 100644 --- a/valet/engine/optimizer/ostro_server/db_cleaner.py +++ b/valet/engine/optimizer/ostro_server/db_cleaner.py @@ -1,26 +1,19 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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. - -################################################################################################################# -# Author: Gueyoung Jung -# Contact: gjung@research.att.com -# Version 2.0.2: Feb. 9, 2016 -# -# Functions # - Handle user requests -# -################################################################################################################# - import sys diff --git a/valet/engine/optimizer/ostro_server/ostro_daemon.py b/valet/engine/optimizer/ostro_server/ostro_daemon.py index 08b8f64..8591ad8 100755 --- a/valet/engine/optimizer/ostro_server/ostro_daemon.py +++ b/valet/engine/optimizer/ostro_server/ostro_daemon.py @@ -1,16 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 22, 2016 +# 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 diff --git a/valet/engine/optimizer/util/util.py b/valet/engine/optimizer/util/util.py index 74b2e39..f3d5637 100755 --- a/valet/engine/optimizer/util/util.py +++ b/valet/engine/optimizer/util/util.py @@ -1,16 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Feb. 9, 2016 +# 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 os import listdir, stat from os.path import isfile, join diff --git a/valet/engine/resource_manager/compute.py b/valet/engine/resource_manager/compute.py index f259e22..91e35b8 100755 --- a/valet/engine/resource_manager/compute.py +++ b/valet/engine/resource_manager/compute.py @@ -1,16 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 +# 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 novaclient import client as nova_client from oslo_config import cfg @@ -143,12 +144,9 @@ class Compute(object): result_status_detail = self._get_vm_detail(vm_uuid, vm_detail) if result_status_detail == "success": - # if vm_detail[3] != "SHUTOFF": # status == "ACTIVE" or "SUSPENDED" vm_id = ("none", vm_detail[0], vm_uuid) _hosts[hk].vm_list.append(vm_id) - # _logical_groups[vm_detail[1]].vm_list.append(vm_id) - # _logical_groups[vm_detail[1]].vms_per_host[hk].append(vm_id) else: error_status = result_status_detail break @@ -302,44 +300,3 @@ class Compute(object): return "Error while getting flavor extra spec" return "success" - - -# Unit test -''' -if __name__ == '__main__': - config = Config() - config_status = config.configure() - if config_status != "success": - print "Error while configuring Ostro: " + config_status - sys.exit(2) - - auth = Authentication() - - admin_token = auth.get_tenant_token(config) - if admin_token is None: - print "Error while getting admin_token" - sys.exit(2) - else: - print "admin_token=",admin_token - - project_token = auth.get_project_token(config, admin_token) - if project_token is None: - print "Error while getting project_token" - sys.exit(2) - else: - print "project_token=",project_token - - c = Compute(config, admin_token, project_token) - - hosts = {} - logical_groups = {} - flavors = {} - - #c._set_availability_zones(hosts, logical_groups) - #c._set_aggregates(None, logical_groups) - #c._set_placed_vms(hosts, logical_groups) - #c._get_vms_of_host("qos101", None) - #c._get_vm_detail("20b2890b-81bb-4942-94bf-c6bee29630bb", None) - c._set_resources(hosts) - #c._set_flavors(flavors) -''' diff --git a/valet/engine/resource_manager/compute_manager.py b/valet/engine/resource_manager/compute_manager.py index e53a4e2..1135341 100755 --- a/valet/engine/resource_manager/compute_manager.py +++ b/valet/engine/resource_manager/compute_manager.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 22, 2016 - +# 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 import time @@ -38,7 +38,6 @@ class ComputeManager(threading.Thread): self.logger = _logger - # self.auth = Authentication(_logger) self.admin_token = None self.project_token = None @@ -92,10 +91,10 @@ class ComputeManager(threading.Thread): if triggered_host_updates is True and triggered_flavor_updates is True: if self.resource.update_topology() is False: - # TODO(GY): error in MUSIC. ignore? + # TODO: error in MUSIC. ignore? pass else: - # TODO(GY): error handling, e.g., 3 times failure then stop Ostro? + # TODO: error handling, e.g., 3 times failure then stop Ostro? pass finally: self.data_lock.release() @@ -104,22 +103,6 @@ class ComputeManager(threading.Thread): return True - # def _set_admin_token(self): - # self.admin_token = self.auth.get_tenant_token(self.config) - # if self.admin_token is None: - # self.logger.error("ComputeManager: " + self.auth.status) - # return False - # - # return True - - # def _set_project_token(self): - # self.project_token = self.auth.get_project_token(self.config, self.admin_token) - # if self.project_token is None: - # self.logger.error("ComputeManager: " + self.auth.status) - # return False - # - # return True - def set_hosts(self): hosts = {} logical_groups = {} diff --git a/valet/engine/resource_manager/compute_simulator.py b/valet/engine/resource_manager/compute_simulator.py index 4659370..646ebf0 100644 --- a/valet/engine/resource_manager/compute_simulator.py +++ b/valet/engine/resource_manager/compute_simulator.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 4, 2016 - +# 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 valet.engine.resource_manager.resource_base import Host, LogicalGroup, Flavor @@ -103,7 +103,6 @@ class SimCompute(object): flavor.mem_cap = self.config.base_flavor_mem * (a_num + 1) flavor.disk_cap = self.config.base_flavor_disk * (a_num + 1) - # flavor.extra_specs["availability_zone"] = "nova" flavor.extra_specs["cpu_allocation_ratio"] = "0.5" _flavors[flavor.name] = flavor diff --git a/valet/engine/resource_manager/resource.py b/valet/engine/resource_manager/resource.py index df9d080..1492e98 100755 --- a/valet/engine/resource_manager/resource.py +++ b/valet/engine/resource_manager/resource.py @@ -1,16 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 +# 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 sys @@ -89,7 +90,6 @@ class Resource(object): self.logger.debug("Resource.bootstrap_from_db: flavors loaded") else: self.logger.error("Resource.bootstrap_from_db: fail loading flavors") - # return False switches = _resource_status.get("switches") if switches: @@ -132,7 +132,6 @@ class Resource(object): self.logger.debug("Resource.bootstrap_from_db: switch links loaded") else: self.logger.error("Resource.bootstrap_from_db: fail loading switches") - # return False # storage_hosts hosts = _resource_status.get("hosts") @@ -172,7 +171,6 @@ class Resource(object): self.logger.debug("Resource.bootstrap_from_db: hosts loaded") else: self.logger.error("Resource.bootstrap_from_db: fail loading hosts") - # return False host_groups = _resource_status.get("host_groups") if host_groups: @@ -206,7 +204,6 @@ class Resource(object): self.logger.debug("Resource.bootstrap_from_db: host_groups loaded") else: self.logger.error("Resource.bootstrap_from_db: fail loading host_groups") - # return False dc = _resource_status.get("datacenter") if dc: @@ -243,7 +240,6 @@ class Resource(object): self.logger.debug("Resource.bootstrap_from_db: datacenter loaded") else: self.logger.error("Resource.bootstrap_from_db: fail loading datacenter") - # return False hgs = _resource_status.get("host_groups") if hgs: diff --git a/valet/engine/resource_manager/resource_base.py b/valet/engine/resource_manager/resource_base.py index fe6a050..ed7536f 100755 --- a/valet/engine/resource_manager/resource_base.py +++ b/valet/engine/resource_manager/resource_base.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 27, 2016 - +# 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 valet.engine.optimizer.app_manager.app_topology_base import LEVELS diff --git a/valet/engine/resource_manager/topology.py b/valet/engine/resource_manager/topology.py index 0fb00e9..0a0b3fc 100755 --- a/valet/engine/resource_manager/topology.py +++ b/valet/engine/resource_manager/topology.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Aug. 12, 2016 - +# 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 copy import sys @@ -53,21 +53,6 @@ class Topology(object): if region_name not in _datacenter.region_code_list: _datacenter.region_code_list.append(region_name) - ''' - if status == "success": - if _datacenter.region_code != None: - if _datacenter.region_code == "none": - pass - else: - if _datacenter.region_code != region_name: - _datacenter.region_code = "none" - else: - _datacenter.region_code = region_name - else: - self.logger.warn(status + " while parsing host_name (" + rhk + ")") - _datacenter.region_code = region_name - ''' - if rack_name not in _host_groups.keys(): host_group = HostGroup(rack_name) host_group.host_type = "rack" diff --git a/valet/engine/resource_manager/topology_manager.py b/valet/engine/resource_manager/topology_manager.py index fa004ab..e2ae896 100755 --- a/valet/engine/resource_manager/topology_manager.py +++ b/valet/engine/resource_manager/topology_manager.py @@ -1,17 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. - -# Modified: Sep. 22, 2016 - +# 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 import time @@ -83,7 +83,7 @@ class TopologyManager(threading.Thread): try: if self.set_topology() is True: if self.resource.update_topology() is False: - # TODO(GY): ignore? + # TODO: ignore? pass finally: self.data_lock.release() diff --git a/valet/engine/resource_manager/topology_simulator.py b/valet/engine/resource_manager/topology_simulator.py index 96ae223..ebe5b9d 100644 --- a/valet/engine/resource_manager/topology_simulator.py +++ b/valet/engine/resource_manager/topology_simulator.py @@ -1,26 +1,19 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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. - -################################################################################################################# -# Author: Gueyoung Jung -# Contact: gjung@research.att.com -# Version 2.0.2: Feb. 9, 2016 -# -# Functions # - Simulate datacenter configurations (i.e., layout, cabling) -# -################################################################################################################# - from valet.engine.resource_manager.resource_base import HostGroup, Host, Switch, Link diff --git a/valet/ha/ha_valet.cfg b/valet/ha/ha_valet.cfg index 87e6ab7..0498ecc 100644 --- a/valet/ha/ha_valet.cfg +++ b/valet/ha/ha_valet.cfg @@ -2,19 +2,19 @@ # vi: sw=4 ts=4: # # --------------------------------------------------------------------------- -# Copyright (c) 2013-2015 AT&T Intellectual Property +# Copyright 2014-2017 AT&T Intellectual Property # -# 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: +# 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. -# See the License for the specific language governing permissions and -# limitations under the License. +# 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. # --------------------------------------------------------------------------- # # diff --git a/valet/ha/ha_valet.py b/valet/ha/ha_valet.py index 3960f5c..7c47610 100644 --- a/valet/ha/ha_valet.py +++ b/valet/ha/ha_valet.py @@ -1,22 +1,19 @@ #!/usr/bin/env python # vi: sw=4 ts=4: # -# --------------------------------------------------------------------------- -# Copyright (c) 2013-2015 AT&T Intellectual Property +# Copyright 2014-2017 AT&T Intellectual Property # -# 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: +# 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. """ @@ -157,7 +154,6 @@ class HaValetThread (threading.Thread): def __init__(self, data, exit_event): threading.Thread.__init__(self) - # self.exitFlag = exit_event self.data = data self.log = None @@ -171,7 +167,6 @@ class HaValetThread (threading.Thread): fqdn_list.append(this_node) # Read list of standby valet nodes and find us - # standby_list = [] standby_list = self.data.get(STAND_BY_LIST, None) while not len(standby_list) is 0: # loop until we find us @@ -451,23 +446,8 @@ class HAValet(object): prepare_log(self, 'havalet') self.log.info('ha_valet v1.1 starting') - # parser = argparse.ArgumentParser() - # parser.add_argument('-p', '--process', help='process name to monitor', default='') - # parser.add_argument('-f', '--file', help='configuraion file', default=DEFAULT_CONF_FILE) - # args = parser.parse_args() - conf_data = read_conf() - # if a specific process was asked for.. - # remove all others - # if args.process is not '': - # for key in conf_data.keys(): - # if key != args.process: - # del conf_data[key] - # - # if conf_data.get(args.process) is None: - # print args.process, ' - process not found in conf.' - if len(conf_data.keys()) is 0: self.log.warn('Processes list is empty - leaving.') return diff --git a/valet/ha/ha_valet2.cfg b/valet/ha/ha_valet2.cfg index 8a24229..9d7998e 100644 --- a/valet/ha/ha_valet2.cfg +++ b/valet/ha/ha_valet2.cfg @@ -1,20 +1,20 @@ -#!/usr/bin/env python -# vi: sw=4 ts=4: + + # # --------------------------------------------------------------------------- -# Copyright (c) 2013-2015 AT&T Intellectual Property +# Copyright 2014-2017 AT&T Intellectual Property # -# 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: +# 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. -# See the License for the specific language governing permissions and -# limitations under the License. +# 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. # --------------------------------------------------------------------------- # # diff --git a/valet/tests/api/config.py b/valet/tests/api/config.py index 0a089a8..74d490e 100644 --- a/valet/tests/api/config.py +++ b/valet/tests/api/config.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/tests/api/conftest.py b/valet/tests/api/conftest.py index e4f6f23..c071b7f 100644 --- a/valet/tests/api/conftest.py +++ b/valet/tests/api/conftest.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/tests/api/controllers/test_plans.py b/valet/tests/api/controllers/test_plans.py index 13bae4c..c552a1f 100644 --- a/valet/tests/api/controllers/test_plans.py +++ b/valet/tests/api/controllers/test_plans.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # # 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. diff --git a/valet/tests/base.py b/valet/tests/base.py index 27f5b6e..5740973 100644 --- a/valet/tests/base.py +++ b/valet/tests/base.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 5, 2016 - -@author: Yael -''' +# 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 oslo_config import fixture as fixture_config from oslo_log import log as logging diff --git a/valet/tests/functional/valet_validator/common/auth.py b/valet/tests/functional/valet_validator/common/auth.py index aaec5c0..ca156c6 100644 --- a/valet/tests/functional/valet_validator/common/auth.py +++ b/valet/tests/functional/valet_validator/common/auth.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 keystoneclient.auth.identity import v2 as identity from keystoneclient import session diff --git a/valet/tests/functional/valet_validator/common/init.py b/valet/tests/functional/valet_validator/common/init.py index 75bbd0f..cb3d067 100644 --- a/valet/tests/functional/valet_validator/common/init.py +++ b/valet/tests/functional/valet_validator/common/init.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 5, 2016 - -@author: Yael -''' +# 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 oslo_config import cfg diff --git a/valet/tests/functional/valet_validator/common/resources.py b/valet/tests/functional/valet_validator/common/resources.py index 2fcc688..cf0accf 100644 --- a/valet/tests/functional/valet_validator/common/resources.py +++ b/valet/tests/functional/valet_validator/common/resources.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 23, 2016 - -@author: Yael -''' +# 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 oslo_log import log as logging import traceback diff --git a/valet/tests/functional/valet_validator/compute/analyzer.py b/valet/tests/functional/valet_validator/compute/analyzer.py index 6d7534f..15ab574 100644 --- a/valet/tests/functional/valet_validator/compute/analyzer.py +++ b/valet/tests/functional/valet_validator/compute/analyzer.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 novaclient import client import traceback diff --git a/valet/tests/functional/valet_validator/group_api/valet_group.py b/valet/tests/functional/valet_validator/group_api/valet_group.py index 20e5581..f53d26a 100644 --- a/valet/tests/functional/valet_validator/group_api/valet_group.py +++ b/valet/tests/functional/valet_validator/group_api/valet_group.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Jul 3, 2016 - -@author: Yael -''' +# 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 requests diff --git a/valet/tests/functional/valet_validator/orchestration/loader.py b/valet/tests/functional/valet_validator/orchestration/loader.py index 3c66b4c..3940e79 100644 --- a/valet/tests/functional/valet_validator/orchestration/loader.py +++ b/valet/tests/functional/valet_validator/orchestration/loader.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 2, 2016 - -@author: Yael -''' +# 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 heatclient.client import Client import sys diff --git a/valet/tests/functional/valet_validator/tests/functional_base.py b/valet/tests/functional/valet_validator/tests/functional_base.py index 4645c04..191bd10 100644 --- a/valet/tests/functional/valet_validator/tests/functional_base.py +++ b/valet/tests/functional/valet_validator/tests/functional_base.py @@ -1,19 +1,18 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 5, 2016 +# 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. -@author: Yael -''' import os from oslo_log import log as logging diff --git a/valet/tests/functional/valet_validator/tests/test_affinity.py b/valet/tests/functional/valet_validator/tests/test_affinity.py index 1da15e1..8a5d189 100644 --- a/valet/tests/functional/valet_validator/tests/test_affinity.py +++ b/valet/tests/functional/valet_validator/tests/test_affinity.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 oslo_config import cfg from oslo_log import log as logging diff --git a/valet/tests/functional/valet_validator/tests/test_affinity_3_Instances.py b/valet/tests/functional/valet_validator/tests/test_affinity_3_Instances.py index 7e2423d..d8e63a5 100644 --- a/valet/tests/functional/valet_validator/tests/test_affinity_3_Instances.py +++ b/valet/tests/functional/valet_validator/tests/test_affinity_3_Instances.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 oslo_config import cfg from oslo_log import log as logging diff --git a/valet/tests/functional/valet_validator/tests/test_diversity.py b/valet/tests/functional/valet_validator/tests/test_diversity.py index 262964c..8249f86 100644 --- a/valet/tests/functional/valet_validator/tests/test_diversity.py +++ b/valet/tests/functional/valet_validator/tests/test_diversity.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 oslo_config import cfg from oslo_log import log as logging diff --git a/valet/tests/functional/valet_validator/tests/test_exclusivity.py b/valet/tests/functional/valet_validator/tests/test_exclusivity.py index 8b3ad2a..ffbbab0 100644 --- a/valet/tests/functional/valet_validator/tests/test_exclusivity.py +++ b/valet/tests/functional/valet_validator/tests/test_exclusivity.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Jun 1, 2016 - -@author: Yael -''' +# 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 oslo_config import cfg from oslo_log import log as logging diff --git a/valet/tests/functional/valet_validator/tests/test_groups.py b/valet/tests/functional/valet_validator/tests/test_groups.py index 2490bea..da55ff7 100644 --- a/valet/tests/functional/valet_validator/tests/test_groups.py +++ b/valet/tests/functional/valet_validator/tests/test_groups.py @@ -1,20 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Jul 4, 2016 - -@author: Yael -''' - +# 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 valet.tests.functional.valet_validator.common.auth import Auth from valet.tests.functional.valet_validator.common import GeneralLogger diff --git a/valet/tests/functional/valet_validator/tests/test_nested.py b/valet/tests/functional/valet_validator/tests/test_nested.py index 6a05068..66239b9 100644 --- a/valet/tests/functional/valet_validator/tests/test_nested.py +++ b/valet/tests/functional/valet_validator/tests/test_nested.py @@ -1,19 +1,17 @@ -# 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 +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 18, 2016 - -@author: root -''' +# 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 oslo_config import cfg from oslo_log import log as logging diff --git a/valet/tests/tempest/api/base.py b/valet/tests/tempest/api/base.py index cd8b819..82504a5 100644 --- a/valet/tests/tempest/api/base.py +++ b/valet/tests/tempest/api/base.py @@ -1,19 +1,16 @@ #!/usr/bin/env python -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/tests/tempest/api/disabled_test_plan.py b/valet/tests/tempest/api/disabled_test_plan.py index 948e50b..aa37fca 100644 --- a/valet/tests/tempest/api/disabled_test_plan.py +++ b/valet/tests/tempest/api/disabled_test_plan.py @@ -1,19 +1,16 @@ #!/usr/bin/env python -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T# # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/tests/tempest/api/test_groups.py b/valet/tests/tempest/api/test_groups.py index 4ea3e1d..568822d 100644 --- a/valet/tests/tempest/api/test_groups.py +++ b/valet/tests/tempest/api/test_groups.py @@ -1,23 +1,19 @@ #!/usr/bin/env python -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. - from tempest.common.utils import data_utils from tempest import test diff --git a/valet/tests/tempest/api/test_members.py b/valet/tests/tempest/api/test_members.py index d3889bf..d95e21e 100644 --- a/valet/tests/tempest/api/test_members.py +++ b/valet/tests/tempest/api/test_members.py @@ -1,19 +1,16 @@ #!/usr/bin/env python -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/tests/tempest/config.py b/valet/tests/tempest/config.py index aaf6172..127a496 100644 --- a/valet/tests/tempest/config.py +++ b/valet/tests/tempest/config.py @@ -1,18 +1,15 @@ -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/tests/tempest/plugin.py b/valet/tests/tempest/plugin.py index 470439d..409ba3a 100644 --- a/valet/tests/tempest/plugin.py +++ b/valet/tests/tempest/plugin.py @@ -1,19 +1,16 @@ #!/usr/bin/env python -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/tests/tempest/scenario/analyzer.py b/valet/tests/tempest/scenario/analyzer.py index a3379ff..dd12e51 100644 --- a/valet/tests/tempest/scenario/analyzer.py +++ b/valet/tests/tempest/scenario/analyzer.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Nov 8, 2016 - -@author: Yael -''' +# 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 collections import defaultdict import os diff --git a/valet/tests/tempest/scenario/general_logger.py b/valet/tests/tempest/scenario/general_logger.py index 63601d5..72de046 100644 --- a/valet/tests/tempest/scenario/general_logger.py +++ b/valet/tests/tempest/scenario/general_logger.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Nov 10, 2016 - -@author: Yael -''' +# 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 oslo_log import log as logging from tempest import config diff --git a/valet/tests/tempest/scenario/resources.py b/valet/tests/tempest/scenario/resources.py index 2fcc688..bf29f77 100644 --- a/valet/tests/tempest/scenario/resources.py +++ b/valet/tests/tempest/scenario/resources.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 23, 2016 - -@author: Yael -''' +# 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 oslo_log import log as logging import traceback diff --git a/valet/tests/tempest/scenario/scenario_base.py b/valet/tests/tempest/scenario/scenario_base.py index a0d7473..576a93f 100644 --- a/valet/tests/tempest/scenario/scenario_base.py +++ b/valet/tests/tempest/scenario/scenario_base.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Nov 6, 2016 - -@author: Yael -''' +# 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 tempest import config diff --git a/valet/tests/tempest/scenario/tests/test_affinity.py b/valet/tests/tempest/scenario/tests/test_affinity.py index 02d82cc..e9f7adf 100644 --- a/valet/tests/tempest/scenario/tests/test_affinity.py +++ b/valet/tests/tempest/scenario/tests/test_affinity.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 valet.tests.tempest.scenario.general_logger import GeneralLogger from valet.tests.tempest.scenario.scenario_base import ScenarioTestCase diff --git a/valet/tests/tempest/scenario/tests/test_diversity.py b/valet/tests/tempest/scenario/tests/test_diversity.py index b7ab82b..4e1d720 100644 --- a/valet/tests/tempest/scenario/tests/test_diversity.py +++ b/valet/tests/tempest/scenario/tests/test_diversity.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 valet.tests.tempest.scenario.general_logger import GeneralLogger from valet.tests.tempest.scenario.scenario_base import ScenarioTestCase diff --git a/valet/tests/tempest/scenario/tests/test_exclusivity.py b/valet/tests/tempest/scenario/tests/test_exclusivity.py index a9abe22..6b061bf 100644 --- a/valet/tests/tempest/scenario/tests/test_exclusivity.py +++ b/valet/tests/tempest/scenario/tests/test_exclusivity.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 valet.tests.tempest.scenario.general_logger import GeneralLogger from valet.tests.tempest.scenario.scenario_base import ScenarioTestCase diff --git a/valet/tests/tempest/scenario/tests/test_nested.py b/valet/tests/tempest/scenario/tests/test_nested.py index 01e5f47..615f84b 100644 --- a/valet/tests/tempest/scenario/tests/test_nested.py +++ b/valet/tests/tempest/scenario/tests/test_nested.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on May 4, 2016 - -@author: Yael -''' +# 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 valet.tests.tempest.scenario.general_logger import GeneralLogger from valet.tests.tempest.scenario.scenario_base import ScenarioTestCase diff --git a/valet/tests/tempest/scenario/valet_group.py b/valet/tests/tempest/scenario/valet_group.py index 8dd280c..a3127e2 100644 --- a/valet/tests/tempest/scenario/valet_group.py +++ b/valet/tests/tempest/scenario/valet_group.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Jul 3, 2016 - -@author: Yael -''' +# 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 requests diff --git a/valet/tests/tempest/services/client.py b/valet/tests/tempest/services/client.py index 5726b70..63b610d 100644 --- a/valet/tests/tempest/services/client.py +++ b/valet/tests/tempest/services/client.py @@ -1,19 +1,16 @@ #!/usr/bin/env python -# -*- encoding: utf-8 -*- -# -# Copyright (c) 2014-2016 AT&T # +# Copyright 2014-2017 AT&T Intellectual Property +# # 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. diff --git a/valet/tests/unit/api/common/test_hooks.py b/valet/tests/unit/api/common/test_hooks.py index f37f993..964b64c 100644 --- a/valet/tests/unit/api/common/test_hooks.py +++ b/valet/tests/unit/api/common/test_hooks.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 29, 2016 - -@author: stack -''' +# 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 mock import valet.api.common.hooks as hooks diff --git a/valet/tests/unit/api/common/test_identity.py b/valet/tests/unit/api/common/test_identity.py index bd7aaa9..07982b2 100644 --- a/valet/tests/unit/api/common/test_identity.py +++ b/valet/tests/unit/api/common/test_identity.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 29, 2016 - -@author: stack -''' +# 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 mock from valet.api.common.identity import Identity diff --git a/valet/tests/unit/api/common/test_messaging.py b/valet/tests/unit/api/common/test_messaging.py index d62e8ae..675cdeb 100644 --- a/valet/tests/unit/api/common/test_messaging.py +++ b/valet/tests/unit/api/common/test_messaging.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 28, 2016 - -@author: stack -''' +# 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 mock import valet.api.common.messaging as messaging diff --git a/valet/tests/unit/api/common/test_ostro_helper.py b/valet/tests/unit/api/common/test_ostro_helper.py index 9019989..2ab6bc4 100644 --- a/valet/tests/unit/api/common/test_ostro_helper.py +++ b/valet/tests/unit/api/common/test_ostro_helper.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 27, 2016 - -@author: stack -''' +# 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 mock import valet.api.common.ostro_helper as helper diff --git a/valet/tests/unit/api/db/test_groups.py b/valet/tests/unit/api/db/test_groups.py index dc408bd..4ed94ff 100644 --- a/valet/tests/unit/api/db/test_groups.py +++ b/valet/tests/unit/api/db/test_groups.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 26, 2016 - -@author: stack -''' +# 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 mock from valet.api.db.models.music import Base diff --git a/valet/tests/unit/api/db/test_ostro.py b/valet/tests/unit/api/db/test_ostro.py index cbf6e93..3a55a27 100644 --- a/valet/tests/unit/api/db/test_ostro.py +++ b/valet/tests/unit/api/db/test_ostro.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 26, 2016 - -@author: stack -''' +# 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 valet.api.db.models.music.ostro import PlacementRequest, PlacementResult, Event from valet.tests.unit.api.v1.api_base import ApiBase diff --git a/valet/tests/unit/api/db/test_placements.py b/valet/tests/unit/api/db/test_placements.py index a2ed40a..15c6bad 100644 --- a/valet/tests/unit/api/db/test_placements.py +++ b/valet/tests/unit/api/db/test_placements.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 26, 2016 - -@author: stack -''' +# 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 mock from valet.api.db.models.music import Base diff --git a/valet/tests/unit/api/db/test_plans.py b/valet/tests/unit/api/db/test_plans.py index a8e3f1c..8443e03 100644 --- a/valet/tests/unit/api/db/test_plans.py +++ b/valet/tests/unit/api/db/test_plans.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 26, 2016 - -@author: stack -''' +# 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 valet.api.db.models import Plan from valet.tests.unit.api.v1.api_base import ApiBase diff --git a/valet/tests/unit/api/v1/api_base.py b/valet/tests/unit/api/v1/api_base.py index f53731a..13b88dc 100644 --- a/valet/tests/unit/api/v1/api_base.py +++ b/valet/tests/unit/api/v1/api_base.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 25, 2016 - -@author: stack -''' +# 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 mock import pecan diff --git a/valet/tests/unit/api/v1/test_groups.py b/valet/tests/unit/api/v1/test_groups.py index 596b3e0..3108572 100644 --- a/valet/tests/unit/api/v1/test_groups.py +++ b/valet/tests/unit/api/v1/test_groups.py @@ -1,14 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 mock import pecan diff --git a/valet/tests/unit/api/v1/test_placements.py b/valet/tests/unit/api/v1/test_placements.py index 15e800b..e6c7e85 100644 --- a/valet/tests/unit/api/v1/test_placements.py +++ b/valet/tests/unit/api/v1/test_placements.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 19, 2016 - -@author: stack -''' +# 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 mock import valet.api.v1.controllers.placements as placements diff --git a/valet/tests/unit/api/v1/test_plans.py b/valet/tests/unit/api/v1/test_plans.py index 9bd88c6..7bc4471 100644 --- a/valet/tests/unit/api/v1/test_plans.py +++ b/valet/tests/unit/api/v1/test_plans.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 25, 2016 - -@author: stack -''' +# 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 mock import valet.api.v1.controllers.plans as plans diff --git a/valet/tests/unit/api/v1/test_root.py b/valet/tests/unit/api/v1/test_root.py index 106cc92..2739320 100644 --- a/valet/tests/unit/api/v1/test_root.py +++ b/valet/tests/unit/api/v1/test_root.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 26, 2016 - -@author: stack -''' +# 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 mock import valet.api.v1.controllers.root as root diff --git a/valet/tests/unit/api/v1/test_status.py b/valet/tests/unit/api/v1/test_status.py index 71863f9..939f9e6 100644 --- a/valet/tests/unit/api/v1/test_status.py +++ b/valet/tests/unit/api/v1/test_status.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 26, 2016 - -@author: stack -''' +# 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 mock import valet.api.v1.controllers.status as status diff --git a/valet/tests/unit/api/v1/test_v1.py b/valet/tests/unit/api/v1/test_v1.py index d67de61..6437842 100644 --- a/valet/tests/unit/api/v1/test_v1.py +++ b/valet/tests/unit/api/v1/test_v1.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 22, 2016 - -@author: stack -''' +# 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 mock import pecan diff --git a/valet/tests/unit/cli/test_groupcli.py b/valet/tests/unit/cli/test_groupcli.py index 1f5fb95..ebb6060 100644 --- a/valet/tests/unit/cli/test_groupcli.py +++ b/valet/tests/unit/cli/test_groupcli.py @@ -1,14 +1,18 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 mock # from valet.cli.groupcli import cmd_details import valet.cli.groupcli as grpcli diff --git a/valet/tests/unit/cli/test_valetcli.py b/valet/tests/unit/cli/test_valetcli.py index 09b9cce..94788f4 100644 --- a/valet/tests/unit/cli/test_valetcli.py +++ b/valet/tests/unit/cli/test_valetcli.py @@ -1,14 +1,18 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 mock from valet.cli.valetcli import Cli from valet.tests.base import Base diff --git a/valet/tests/unit/engine/test_config.py b/valet/tests/unit/engine/test_config.py index 423e23d..b61a332 100644 --- a/valet/tests/unit/engine/test_config.py +++ b/valet/tests/unit/engine/test_config.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Aug 17, 2016 - -@author: YB -''' +# 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 from valet.engine.optimizer.ostro_server.configuration import Config diff --git a/valet/tests/unit/engine/test_search.py b/valet/tests/unit/engine/test_search.py index f3b3983..3a89822 100644 --- a/valet/tests/unit/engine/test_search.py +++ b/valet/tests/unit/engine/test_search.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Sep 26, 2016 - -@author: stack -''' +# 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 logging import mock diff --git a/valet/tests/unit/engine/test_topology.py b/valet/tests/unit/engine/test_topology.py index 5cc3bc8..5931c10 100644 --- a/valet/tests/unit/engine/test_topology.py +++ b/valet/tests/unit/engine/test_topology.py @@ -1,19 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. -''' -Created on Aug 17, 2016 - -@author: YB -''' +# 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 valet.engine.resource_manager.topology import Topology from valet.tests.base import Base diff --git a/valet/tests/unit/test_general.py b/valet/tests/unit/test_general.py index 5078c78..cea98e0 100644 --- a/valet/tests/unit/test_general.py +++ b/valet/tests/unit/test_general.py @@ -1,14 +1,17 @@ -# 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 # +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. +# 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 valet.tests.base import Base diff --git a/valet_plugins/setup.py b/valet_plugins/setup.py index a68a83c..88d71d0 100644 --- a/valet_plugins/setup.py +++ b/valet_plugins/setup.py @@ -1,19 +1,17 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T -# -# 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 2014-2017 AT&T Intellectual Property +# +# 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. '''Setup''' diff --git a/valet_plugins/valet_plugins/common/valet_api.py b/valet_plugins/valet_plugins/common/valet_api.py index 905aab0..d7e944b 100644 --- a/valet_plugins/valet_plugins/common/valet_api.py +++ b/valet_plugins/valet_plugins/common/valet_api.py @@ -1,18 +1,17 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # -# 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 +# 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. See the License for the specific language governing permissions and -# limitations under the License. +# 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. '''Valet API Wrapper''' @@ -162,7 +161,6 @@ class ValetAPIWrapper(object): req = requests.get(url, headers=self.headers, timeout=timeout) # TODO(JD): Raise an exception IFF the scheduler can handle it - # req.raise_for_status() response = json.loads(req.text) except Exception: # pylint: disable=W0702 diff --git a/valet_plugins/valet_plugins/heat/GroupAssignment.py b/valet_plugins/valet_plugins/heat/GroupAssignment.py index 2f4cf88..f72cf66 100644 --- a/valet_plugins/valet_plugins/heat/GroupAssignment.py +++ b/valet_plugins/valet_plugins/heat/GroupAssignment.py @@ -1,18 +1,17 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # -# 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 +# 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. See the License for the specific language governing permissions and -# limitations under the License. +# 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. '''GroupAssignment Heat Resource Plugin''' diff --git a/valet_plugins/valet_plugins/plugins/heat/plugins.py b/valet_plugins/valet_plugins/plugins/heat/plugins.py index d7c37c1..f1580e5 100644 --- a/valet_plugins/valet_plugins/plugins/heat/plugins.py +++ b/valet_plugins/valet_plugins/plugins/heat/plugins.py @@ -1,18 +1,17 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # -# 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 +# 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. See the License for the specific language governing permissions and -# limitations under the License. +# 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. '''Valet Plugins for Heat''' diff --git a/valet_plugins/valet_plugins/plugins/nova/valet_filter.py b/valet_plugins/valet_plugins/plugins/nova/valet_filter.py index 488113f..d2f99c1 100644 --- a/valet_plugins/valet_plugins/plugins/nova/valet_filter.py +++ b/valet_plugins/valet_plugins/plugins/nova/valet_filter.py @@ -1,18 +1,17 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T +# Copyright 2014-2017 AT&T Intellectual Property # -# 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 +# 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. See the License for the specific language governing permissions and -# limitations under the License. +# 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. '''Valet Nova Scheduler Filter''' @@ -114,7 +113,6 @@ class ValetFilter(filters.BaseHostFilter): # TODO(JD): If we can't reach Valet at all, we may opt to fail # TODO(JD): all hosts depending on a TBD config flag. -# if not filter_properties.get(hints_key, {}).has_key(orch_id_key): if orch_id_key not in filter_properties.get(hints_key, {}): self._authorize() LOG.warn(_LW("Valet: Heat Stack Lifecycle Scheduler Hints not found. Performing ad-hoc placement.")) diff --git a/valet_plugins/valet_plugins/tests/base.py b/valet_plugins/valet_plugins/tests/base.py index 26665b8..614d628 100644 --- a/valet_plugins/valet_plugins/tests/base.py +++ b/valet_plugins/valet_plugins/tests/base.py @@ -1,19 +1,17 @@ -# -*- encoding: utf-8 -*- # -# Copyright (c) 2014-2016 AT&T -# -# 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 2014-2017 AT&T Intellectual Property +# +# 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 oslo_config import fixture as fixture_config from oslo_log import log as logging diff --git a/valet_plugins/valet_plugins/tests/unit/mocks/heat/common/i18n.py b/valet_plugins/valet_plugins/tests/unit/mocks/heat/common/i18n.py index 56d5d53..37d7a56 100644 --- a/valet_plugins/valet_plugins/tests/unit/mocks/heat/common/i18n.py +++ b/valet_plugins/valet_plugins/tests/unit/mocks/heat/common/i18n.py @@ -1,7 +1,16 @@ -''' -Created on Sep 14, 2016 - -@author: stack -''' +# +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. _ = None diff --git a/valet_plugins/valet_plugins/tests/unit/mocks/heat/engine/lifecycle_plugin.py b/valet_plugins/valet_plugins/tests/unit/mocks/heat/engine/lifecycle_plugin.py index 8044105..380468c 100644 --- a/valet_plugins/valet_plugins/tests/unit/mocks/heat/engine/lifecycle_plugin.py +++ b/valet_plugins/valet_plugins/tests/unit/mocks/heat/engine/lifecycle_plugin.py @@ -1,22 +1,17 @@ # -# 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. - -''' -Created on Sep 14, 2016 - -@author: stack -''' - +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. class LifecyclePlugin(object): ''' classdocs ''' diff --git a/valet_plugins/valet_plugins/tests/unit/mocks/nova/i18n.py b/valet_plugins/valet_plugins/tests/unit/mocks/nova/i18n.py index 373df7f..0cac3a2 100644 --- a/valet_plugins/valet_plugins/tests/unit/mocks/nova/i18n.py +++ b/valet_plugins/valet_plugins/tests/unit/mocks/nova/i18n.py @@ -1,21 +1,17 @@ # -# 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. -''' -Created on Sep 14, 2016 - -@author: stack -''' - +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. def _(string): pass diff --git a/valet_plugins/valet_plugins/tests/unit/mocks/nova/scheduler/filters.py b/valet_plugins/valet_plugins/tests/unit/mocks/nova/scheduler/filters.py index ad629e1..6d651cf 100644 --- a/valet_plugins/valet_plugins/tests/unit/mocks/nova/scheduler/filters.py +++ b/valet_plugins/valet_plugins/tests/unit/mocks/nova/scheduler/filters.py @@ -1,21 +1,17 @@ # -# 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. -''' -Created on Sep 15, 2016 - -@author: stack -''' - +# Copyright 2014-2017 AT&T Intellectual Property +# +# 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. class BaseHostFilter(object): ''' classdocs ''' diff --git a/valet_plugins/valet_plugins/tests/unit/test_plugins.py b/valet_plugins/valet_plugins/tests/unit/test_plugins.py index bb9d8db..c0c600a 100644 --- a/valet_plugins/valet_plugins/tests/unit/test_plugins.py +++ b/valet_plugins/valet_plugins/tests/unit/test_plugins.py @@ -1,15 +1,17 @@ # -# 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 2014-2017 AT&T Intellectual Property +# +# 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 mock from valet_plugins.plugins.heat.plugins import ValetLifecyclePlugin diff --git a/valet_plugins/valet_plugins/tests/unit/test_valet_api.py b/valet_plugins/valet_plugins/tests/unit/test_valet_api.py index cd1383b..7dfe408 100644 --- a/valet_plugins/valet_plugins/tests/unit/test_valet_api.py +++ b/valet_plugins/valet_plugins/tests/unit/test_valet_api.py @@ -1,15 +1,17 @@ # -# 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 2014-2017 AT&T Intellectual Property +# +# 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 mock from valet_plugins.tests.base import Base diff --git a/valet_plugins/valet_plugins/tests/unit/test_valet_filter.py b/valet_plugins/valet_plugins/tests/unit/test_valet_filter.py index 7219265..407cf1c 100644 --- a/valet_plugins/valet_plugins/tests/unit/test_valet_filter.py +++ b/valet_plugins/valet_plugins/tests/unit/test_valet_filter.py @@ -1,15 +1,17 @@ # -# 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 2014-2017 AT&T Intellectual Property +# +# 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 keystoneclient.v2_0 import client import mock