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()
122122 return get_class () . '[ ' . $ this ->Id () . '] ' ;
123123 }
124124
125- /**
126- * returns the object for the Create JSON
127- *
128- * @return \stdClass
129- */
130125 protected function createJson ()
131126 {
132127 $ nodes = (object ) array ('node ' => new \stdClass );
@@ -137,6 +132,21 @@ protected function createJson()
137132 return (object ) array ('nodes ' => array ($ nodes ));
138133 }
139134
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+
140150 /**
141151 * factory method to create a new Metadata child of the Node
142152 *
You can’t perform that action at this time.
0 commit comments