File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
lib/OpenCloud/LoadBalancer/Resource Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -122,11 +122,6 @@ public function name()
122
122
return get_class () . '[ ' . $ this ->Id () . '] ' ;
123
123
}
124
124
125
- /**
126
- * returns the object for the Create JSON
127
- *
128
- * @return \stdClass
129
- */
130
125
protected function createJson ()
131
126
{
132
127
$ nodes = (object ) array ('node ' => new \stdClass );
@@ -137,6 +132,21 @@ protected function createJson()
137
132
return (object ) array ('nodes ' => array ($ nodes ));
138
133
}
139
134
135
+ protected function updateJson ($ params = array ())
136
+ {
137
+ if ($ this ->condition ) {
138
+ $ params ['condition ' ] = $ this ->condition ;
139
+ }
140
+ if ($ this ->type ) {
141
+ $ params ['type ' ] = $ this ->type ;
142
+ }
143
+ if ($ this ->weight ) {
144
+ $ params ['weight ' ] = $ this ->weight ;
145
+ }
146
+
147
+ return (object ) array ('node ' => (object ) $ params );
148
+ }
149
+
140
150
/**
141
151
* factory method to create a new Metadata child of the Node
142
152
*
You can’t perform that action at this time.
0 commit comments