Forum Discussion

Brad_Wheeler_12's avatar
Brad_Wheeler_12
Icon for Nimbostratus rankNimbostratus
Oct 24, 2006

Unexpected modify_string_class behavior

Basically, I need to update a datagroup/class list to include specific name/value pairs. If existing entries are trounced, it's okay. Is modify_string_class the correct way to do this?

 

 

Here are a few more details regarding the behavior I don't understand:

 

Given the following string class:

 

 

class testclass {

 

"valuea 1"

 

"valueb 2"

 

}

 

 

I would expect to modify the members of this class by calling modify_string_class() with the following array of LocalLBClassStringClass class_members, which would result in these (and only these) members remaining.

 

 

"valuea .9"

 

"valueb 2"

 

 

For some reason, I recieve the following exception when submitting the request:

 

 

Exception calling "modify_string_class" with "1" argument(s): "Exception caught in LocalLB::Class::modify_string_class()

 

Exception: Common::OperationFailed

 

primary_error_code : 16908342 (0x01020036)

 

secondary_error_code : 0

 

error_string : 01020036:3: The requested string class member (testclass valuea .9) was not found."

 

At line:1 char:27

 

+ $class.modify_string_class( <<<< $multi)

 

 

1 Reply

  • Your logic is correct. If you are receiving this error message, I'd report this to product support and get you in the queue for a hotfix.

     

     

    Short term solutions:

     

     

    1. call delete_class() and then create_string_class() with all the new members.

     

    2. call delete_string_class_member() for the old value and then add_string_class_member() for the updated value.

     

     

    -Joe