projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try
[osm/SO.git]
/
rwlaunchpad
/
plugins
/
rwnsm
/
rift
/
tasklets
/
rwnsmtasklet
/
scale_group.py
diff --git
a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/scale_group.py
b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/scale_group.py
index
8bbf894
..
e53223f
100644
(file)
--- a/
rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/scale_group.py
+++ b/
rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/scale_group.py
@@
-1,6
+1,6
@@
-#
-# Copyright 2016 RIFT.IO Inc
+#
+# Copyright 2016
-2017
RIFT.IO Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@
-19,7
+19,15
@@
import time
from enum import Enum
from enum import Enum
-from gi.repository import NsdYang, NsrYang
+import gi
+gi.require_version('NsdBaseYang', '1.0')
+gi.require_version('ProjectNsdYang', '1.0')
+gi.require_version('NsrYang', '1.0')
+from gi.repository import (
+ NsdBaseYang,
+ ProjectNsdYang as NsdYang,
+ NsrYang
+ )
class ScalingGroupIndexExists(Exception):
class ScalingGroupIndexExists(Exception):
@@
-104,7
+112,7
@@
class ScalingGroup(object):
def create_record_msg(self):
""" Returns a NSR Scaling group record """
def create_record_msg(self):
""" Returns a NSR Scaling group record """
- msg = NsrYang.YangData_
Nsr
_NsInstanceOpdata_Nsr_ScalingGroupRecord(
+ msg = NsrYang.YangData_
RwProject_Project
_NsInstanceOpdata_Nsr_ScalingGroupRecord(
scaling_group_name_ref=self.name,
)
scaling_group_name_ref=self.name,
)
@@
-151,10
+159,10
@@
class ScalingGroup(object):
def trigger_map(self, trigger):
trig_map = {
def trigger_map(self, trigger):
trig_map = {
- NsdYang.ScalingTrigger.PRE_SCALE_IN : 'pre_scale_in',
- NsdYang.ScalingTrigger.POST_SCALE_IN : 'post_scale_in',
- NsdYang.ScalingTrigger.PRE_SCALE_OUT : 'pre_scale_out',
- NsdYang.ScalingTrigger.POST_SCALE_OUT : 'post_scale_out',
+ Nsd
Base
Yang.ScalingTrigger.PRE_SCALE_IN : 'pre_scale_in',
+ Nsd
Base
Yang.ScalingTrigger.POST_SCALE_IN : 'post_scale_in',
+ Nsd
Base
Yang.ScalingTrigger.PRE_SCALE_OUT : 'pre_scale_out',
+ Nsd
Base
Yang.ScalingTrigger.POST_SCALE_OUT : 'post_scale_out',
}
try:
}
try:
@@
-259,7
+267,7
@@
class ScalingGroupInstance(object):
return self._vnfrs.values()
def create_record_msg(self):
return self._vnfrs.values()
def create_record_msg(self):
- msg = NsrYang.YangData_
Nsr
_NsInstanceOpdata_Nsr_ScalingGroupRecord_Instance(
+ msg = NsrYang.YangData_
RwProject_Project
_NsInstanceOpdata_Nsr_ScalingGroupRecord_Instance(
instance_id=self._instance_id,
create_time=self._create_time,
op_status=self._op_status,
instance_id=self._instance_id,
create_time=self._create_time,
op_status=self._op_status,