cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Path's to Policy

MABaig
Level 3

Hi,

Got a query on a issue I am facing.

I am adding different path's to different policies, is there any way to write a script which can reduce the time for completing these work.

Example- I am adding different path to different policies containing different clients.

I am using "bpplinclude mkbpolicy -add /yap /y* " is there any way in which we can add policy names and path in a file and it will automatically add paths to its policies respectively.

Thanks,

Abaig.

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6

The way I understand this is that the OP requires a way to populate policies with paths by running a script which would invoke bpplinclude which would then draw it's required information from a file (or files) that contains the what needs to be updated.

e.g.

file contains:

policy_a path_a
policy_a path_b
policy_a path_c

policy_b path_a
policy_b path_c
policy_c path_a
policy_d path_a
policy_d path_b
policy_d path_d

A bespoke script is then run that invokes bpplinclude which utilises this file to carry out the updates - probably could be done but by the time you've written the script & populated the file you could've done it all anyway!

 

You could also just as easily add bpplinclude & options to that particular file & then run it!

e.g.

bpplinclude policy_a -add path_a
bpplinclude policy_a -add path_b
bpplinclude policy_a -add path_c

bpplinclude policy_b -add path_a
bpplinclude policy_b -add path_c
etc etc etc

Or I could be totally wrong & this isn't at all what's required!

 

If you have the same path that needs to be added to more than one policy, then another option would be to do this via the GUI - you can right-click copy & paste backup selection paths etc from one policy to another.

***EDIT***

But then of course, you could read the man page for the command itself (which I so obviously didn't as I don't like CLI for amending policies!!) & you come up with this:

 -add -f filename

           Adds all files that are listed in filename to  the
           policy file list.

& then read the man page even closer & realise that the OP has already done this as that's where the example quoted  - I am using "bpplinclude mkbpolicy -add /yap /y* "  -  was taken from!!!!!

 

In short, there are only so many shortcuts you can take to make your life easier before the shortcuts themselves become longer than the journey itself.

View solution in original post

2 REPLIES 2

mansoor_sheik
Level 6
Certified

Hi ,

"I am adding different path to different policies containing different clients"

Can u elaborate your need?

Andy_Welburn
Level 6

The way I understand this is that the OP requires a way to populate policies with paths by running a script which would invoke bpplinclude which would then draw it's required information from a file (or files) that contains the what needs to be updated.

e.g.

file contains:

policy_a path_a
policy_a path_b
policy_a path_c

policy_b path_a
policy_b path_c
policy_c path_a
policy_d path_a
policy_d path_b
policy_d path_d

A bespoke script is then run that invokes bpplinclude which utilises this file to carry out the updates - probably could be done but by the time you've written the script & populated the file you could've done it all anyway!

 

You could also just as easily add bpplinclude & options to that particular file & then run it!

e.g.

bpplinclude policy_a -add path_a
bpplinclude policy_a -add path_b
bpplinclude policy_a -add path_c

bpplinclude policy_b -add path_a
bpplinclude policy_b -add path_c
etc etc etc

Or I could be totally wrong & this isn't at all what's required!

 

If you have the same path that needs to be added to more than one policy, then another option would be to do this via the GUI - you can right-click copy & paste backup selection paths etc from one policy to another.

***EDIT***

But then of course, you could read the man page for the command itself (which I so obviously didn't as I don't like CLI for amending policies!!) & you come up with this:

 -add -f filename

           Adds all files that are listed in filename to  the
           policy file list.

& then read the man page even closer & realise that the OP has already done this as that's where the example quoted  - I am using "bpplinclude mkbpolicy -add /yap /y* "  -  was taken from!!!!!

 

In short, there are only so many shortcuts you can take to make your life easier before the shortcuts themselves become longer than the journey itself.