This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Script for removing components from a service

I have created a service and added my production agents and hosts to them. Now, I need to remove some  components(agents and hosts) from this service.

Can you please guide me how to create a script for this.I just need to delete it from the service and not the entire object. 

 

Regards,

Rv

Parents
  • Hi Roshan,

    If it is just a few components you don't need a script to do that, you can just use the Service Builder. However if you do want to develop some scripts here is a very useful blog article that I have used as the basis for some scripts I have written. I haven't written a script to just remove components from a service, instead I wrote scripts to create services and then when something changed I rerun the creation. The script first makes a number of deleteObject() calls to remove the services before creating them again. This is described in more detail in the blog post: Foglight5:Groovy script for creating services in service Builder.

    Hope that helps,

    Regards,

    Kris

Reply
  • Hi Roshan,

    If it is just a few components you don't need a script to do that, you can just use the Service Builder. However if you do want to develop some scripts here is a very useful blog article that I have used as the basis for some scripts I have written. I haven't written a script to just remove components from a service, instead I wrote scripts to create services and then when something changed I rerun the creation. The script first makes a number of deleteObject() calls to remove the services before creating them again. This is described in more detail in the blog post: Foglight5:Groovy script for creating services in service Builder.

    Hope that helps,

    Regards,

    Kris

Children
No Data