Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

260 lines
13 KiB

  1. use frsobjsup;
  2. package main;
  3. my ($__HashRef, $__k, $__v);
  4. ## Processing file bigbchoff.mrs Modify Time: Tue Apr 3 16:12:28 2001
  5. ## use Time::Local;
  6. use Time::Local;
  7. ## printf "Configuration generated at %s\n\n", scalar localtime;
  8. printf "Configuration generated at %s\n\n", scalar localtime;
  9. ## $stage = "D:\\staging";
  10. $stage = "D:\\staging";
  11. ## $DC_OU_DN = "ou=domain controllers,dc=frs1221,dc=nttest,dc=microsoft,dc=com";
  12. $DC_OU_DN = "ou=domain controllers,dc=frs1221,dc=nttest,dc=microsoft,dc=com";
  13. ## HUB: FRS_SERVER (/RP="E:\RSB" /SP="$stage" /COMPUTER='frs1221\sudarctest1$'
  14. ## /DNS_NAME="sudarctest1.frs1221.nttest.microsoft.com" /MNAME="hub0")
  15. $__HashRef = FRS_SERVER->New(
  16. RP=>"E:\\RSB", SP=>"$stage", COMPUTER=>'frs1221\\sudarctest1$', DNS_NAME=>"sudarctest1.frs1221.nttest.microsoft.com", MNAME=>"hub0"
  17. );
  18. &FRSSUP::AddToSet("HUB", $__HashRef);
  19. ## HUB: FRS_SERVER (/RP="E:\RSB" /SP="$stage" /COMPUTER='frs1221\sudarctest2$'
  20. ## /DNS_NAME="sudarctest2.frs1221.nttest.microsoft.com" /MNAME="hub1")
  21. $__HashRef = FRS_SERVER->New(
  22. RP=>"E:\\RSB", SP=>"$stage", COMPUTER=>'frs1221\\sudarctest2$', DNS_NAME=>"sudarctest2.frs1221.nttest.microsoft.com", MNAME=>"hub1"
  23. );
  24. &FRSSUP::AddToSet("HUB", $__HashRef);
  25. ## for $b (0 .. 200) {
  26. for $b (0 .. 200) {
  27. ## $bchname = "Branch-$b";
  28. $bchname = "Branch-$b";
  29. ## $Nt4Acct = "frs1221\\$b\$";
  30. $Nt4Acct = "frs1221\\$b\$";
  31. ## BCH: FRS_SERVER (/RP="D:\RSB" /SP="D:\staging"
  32. ## /COMPUTER=$Nt4Acct
  33. ## /id="-$b"
  34. ## /DNS_NAME="$bchname.frs1221.nttest.microsoft.com" )
  35. $__HashRef = FRS_SERVER->New(
  36. RP=>"D:\\RSB", SP=>"D:\\staging", COMPUTER=>$Nt4Acct, id=>"-$b", DNS_NAME=>"$bchname.frs1221.nttest.microsoft.com"
  37. );
  38. &FRSSUP::AddToSet("BCH", $__HashRef);
  39. ## }
  40. }
  41. ## PRIMARY_SCH: FRS_SCHEDULE (/REPL_INTERVAL=4 /REPL_DURATION="1:30"
  42. ## /TIME_ZONE="-5:00" /REPL_OFFSET=0 /STAGGER="0:15"
  43. ## /METHOD=1 /NAME='Primary Sched'
  44. ## /DISABLE="mo:07:30-mo:18:00,tu:07:30-tu:18:00,we:07:30-we:18:00,th:07:30-th:18:00,fr:07:30-fr:18:00"
  45. ## )
  46. $__HashRef = FRS_SCHEDULE->New(
  47. REPL_INTERVAL=>4, REPL_DURATION=>"1:30", TIME_ZONE=>"-5:00", REPL_OFFSET=>0, STAGGER=>"0:15", METHOD=>1, NAME=>'Primary Sched', DISABLE=>"mo:07:30-mo:18:00,tu:07:30-tu:18:00,we:07:30-we:18:00,th:07:30-th:18:00,fr:07:30-fr:18:00"
  48. );
  49. &FRSSUP::AddToSet("PRIMARY_SCH", $__HashRef);
  50. ## FRS_SUB CREATE_HUB_SPOKE_CONN(/HUBSET=SET_REF_SET
  51. ## subname = 'CREATE_HUB_SPOKE_CONN', func = 'FRS_SUB', rest = '(/HUBSET=SET_REF_SET '
  52. ## /BCHSET=SET_REF_SET
  53. ## /SC1=SCHEDULE )
  54. sub CREATE_HUB_SPOKE_CONN {
  55. my %__args = (@_);
  56. my ($__HashRef, $__k, $__v);
  57. while ( ($__k, $__v) = each %__args ) { print "\t$__k => '$__v'\n"; }
  58. ## $Hx = 0;
  59. $Hx = 0;
  60. ## $NHub = FRS_COUNT_SET(/SET=%HUBSET%);
  61. $NHub = scalar @{
  62. $__args{HUBSET} }
  63. ;
  64. ## print " NHUB = $NHub\n\n";
  65. print " NHUB = $NHub\n\n";
  66. ## print " NBCH FRS _COUNT_SET( /SET= % BCHSET % ) ", FRS_COUNT_SET(/SET= %BCHSET% ), "\n" ;
  67. print " NBCH FRS _COUNT_SET( /SET= % BCHSET % ) ", scalar @{
  68. $__args{BCHSET} }
  69. , "\n" ;
  70. ## foreach $bch (FRS_ARRAY(/SET=%BCHSET%)) {
  71. foreach $bch ( @{
  72. $__args{BCHSET} }
  73. ) {
  74. ## print "working on branch: $bch->{ONAME}\n";
  75. print "working on branch: $bch->{ONAME}\n";
  76. ## $hubsrv = %HUBSET%[$Hx];
  77. $hubsrv = $__args{HUBSET}[$Hx];
  78. ## FRS_CONNECTION (/TO=$bch /FROM=%HUBSET%[$Hx] /SCHED=%SC1%
  79. ## /ONAME="FROM-".$hubsrv->{MNAME}."-TO-".$bch->{ONAME} )
  80. FRS_CONNECTION->New(
  81. TO=>$bch, FROM=>$__args{HUBSET}[$Hx], SCHED=>$__args{SC1}, ONAME=>"FROM-".$hubsrv->{MNAME}."-TO-".$bch->{ONAME}
  82. );
  83. ## FRS_CONNECTION (/TO=%HUBSET%[$Hx] /FROM=$bch /SCHED=%SC1%
  84. ## /ONAME="FROM-".$bch->{ONAME}."-TO-".$hubsrv->{MNAME} )
  85. FRS_CONNECTION->New(
  86. TO=>$__args{HUBSET}[$Hx], FROM=>$bch, SCHED=>$__args{SC1}, ONAME=>"FROM-".$bch->{ONAME}."-TO-".$hubsrv->{MNAME}
  87. );
  88. ## $Hx=($Hx+1) % $NHub;
  89. $Hx=($Hx+1) % $NHub;
  90. ## if ($Hx == 0) {
  91. if ($Hx == 0) {
  92. ## FRS_STAGGER (/SCHED=%SC1%)
  93. FRS_SCHEDULE::FRS_STAGGER(
  94. SCHED=>$__args{SC1} );
  95. ## }
  96. }
  97. ## }
  98. }
  99. ## FRS_END_SUB
  100. } # FRS_END_SUB
  101. ## FRS_SUB CREATE_RING_CONN(/HUBSET=SET_REF_SET )
  102. ## subname = 'CREATE_RING_CONN', func = 'FRS_SUB', rest = '(/HUBSET=SET_REF_SET )'
  103. sub CREATE_RING_CONN {
  104. my %__args = (@_);
  105. my ($__HashRef, $__k, $__v);
  106. while ( ($__k, $__v) = each %__args ) { print "\t$__k => '$__v'\n"; }
  107. ## FRS_SHOW(/SET=%HUBSET%)
  108. FRSSUP::FRS_SHOW(
  109. SET=>$__args{HUBSET} );
  110. ## $Ringx = 0;
  111. $Ringx = 0;
  112. ## $RingCount = FRS_COUNT_SET(/SET=%HUBSET%);
  113. $RingCount = scalar @{
  114. $__args{HUBSET} }
  115. ;
  116. ## print " RingCount = $RingCount\n\n";
  117. print " RingCount = $RingCount\n\n";
  118. ## for ($Ringx=0; $Ringx < $RingCount-1; $Ringx++) {
  119. for ($Ringx=0; $Ringx < $RingCount-1; $Ringx++) {
  120. ## $RM1 = %HUBSET%[$Ringx];
  121. $RM1 = $__args{HUBSET}[$Ringx];
  122. ## $RM2 = %HUBSET%[($Ringx+1) % $RingCount];
  123. $RM2 = $__args{HUBSET}[($Ringx+1) % $RingCount];
  124. ## FRS_CONNECTION (/TO=$RM1 /FROM=$RM2 /SCHED=ON
  125. ## /ONAME="FROM-".$RM2->{MNAME}."-TO-".$RM1->{MNAME} )
  126. FRS_CONNECTION->New(
  127. TO=>$RM1, FROM=>$RM2, SCHED=>ON, ONAME=>"FROM-".$RM2->{MNAME}."-TO-".$RM1->{MNAME}
  128. );
  129. ## FRS_CONNECTION (/TO=$RM2 /FROM=$RM1 /SCHED=ON
  130. ## /ONAME="FROM-".$RM1->{MNAME}."-TO-".$RM2->{MNAME} )
  131. FRS_CONNECTION->New(
  132. TO=>$RM2, FROM=>$RM1, SCHED=>ON, ONAME=>"FROM-".$RM1->{MNAME}."-TO-".$RM2->{MNAME}
  133. );
  134. ## }
  135. }
  136. ## FRS_END_SUB
  137. } # FRS_END_SUB
  138. ## FRS_SUB CREATE_HUB_SPOKE(/HUBSET=SET_REF_SET
  139. ## subname = 'CREATE_HUB_SPOKE', func = 'FRS_SUB', rest = '(/HUBSET=SET_REF_SET '
  140. ## /BCHSET=SET_REF_SET
  141. ## /SC1=SCHEDULE
  142. ## /REPSETDN=SET_ELEMENT)
  143. sub CREATE_HUB_SPOKE {
  144. my %__args = (@_);
  145. my ($__HashRef, $__k, $__v);
  146. while ( ($__k, $__v) = each %__args ) { print "\t$__k => '$__v'\n"; }
  147. ## FRSSUP::PrintHash(\%__args);
  148. FRSSUP::PrintHash(\%__args);
  149. ## FRS_SHOW(/SET=%HUBSET%)
  150. FRSSUP::FRS_SHOW(
  151. SET=>$__args{HUBSET} );
  152. ## # Restriction: All subroutine argument refs are surrounded by "%"
  153. # Restriction: All subroutine argument refs are surrounded by "%"
  154. ## # notation "->{...}"
  155. # notation "->{...}"
  156. ## foreach $hub (FRS_ARRAY(/SET=%HUBSET%)) {
  157. foreach $hub ( @{
  158. $__args{HUBSET} }
  159. ) {
  160. ## MOBJHUB: FRS_MEMBER (/UNDER=%REPSETDN%
  161. ## /SERVER=$hub
  162. ## /COMPUTER=$hub->{COMPUTER}
  163. ## /ONAME=$hub->{MNAME} )
  164. $__HashRef = FRS_MEMBER->New(
  165. UNDER=>$__args{REPSETDN}, SERVER=>$hub, COMPUTER=>$hub->{COMPUTER}, ONAME=>$hub->{MNAME}
  166. );
  167. &FRSSUP::AddToSet("MOBJHUB", $__HashRef);
  168. ## }
  169. }
  170. ## foreach $bch (FRS_SET(/SET=%BCHSET%)) {
  171. foreach $bch ( @{ FRSSUP::FRS_SET(
  172. SET=>$__args{BCHSET} ) }
  173. ) {
  174. ## MOBJBCH: FRS_MEMBER (/UNDER=%REPSETDN%
  175. ## /SERVER=$bch
  176. ## /COMPUTER=$bch->{COMPUTER}
  177. ## /ONAME="B".$bch->{id} )
  178. $__HashRef = FRS_MEMBER->New(
  179. UNDER=>$__args{REPSETDN}, SERVER=>$bch, COMPUTER=>$bch->{COMPUTER}, ONAME=>"B".$bch->{id}
  180. );
  181. &FRSSUP::AddToSet("MOBJBCH", $__HashRef);
  182. ## }
  183. }
  184. ## CREATE_RING_CONN(/HUBSET=<MOBJHUB> )
  185. &CREATE_RING_CONN (
  186. HUBSET=>&FRSSUP::SelectSet(MOBJHUB) );
  187. ## CREATE_HUB_SPOKE_CONN(/HUBSET=<MOBJHUB>
  188. ## /BCHSET=<MOBJBCH>
  189. ## /SC1=%SC1% )
  190. &CREATE_HUB_SPOKE_CONN (
  191. HUBSET=>&FRSSUP::SelectSet(MOBJHUB), BCHSET=>&FRSSUP::SelectSet(MOBJBCH), SC1=>$__args{SC1} );
  192. ## FRS_END_SUB
  193. &FRSSUP::DeleteSet("MOBJHUB");
  194. &FRSSUP::DeleteSet("MOBJBCH");
  195. } # FRS_END_SUB
  196. ## SETTINGS: FRS_SETTINGS (/DN="cn=services,cn=configuration,dc=frs1221,dc=nttest,dc=microsoft,dc=com"
  197. ## /ONAME="cn=ntfrs test settings")
  198. $__HashRef = FRS_SETTINGS->New(
  199. DN=>"cn=services,cn=configuration,dc=frs1221,dc=nttest,dc=microsoft,dc=com", ONAME=>"cn=ntfrs test settings"
  200. );
  201. &FRSSUP::AddToSet("SETTINGS", $__HashRef);
  202. ## SET: FRS_REPLICASET (/UNDER=<SETTINGS> /TYPE=DFS /ONAME="HubSpokeRepSet")
  203. $__HashRef = FRS_REPLICASET->New(
  204. UNDER=>&FRSSUP::SelectSet(SETTINGS)->[0], TYPE=>DFS, ONAME=>"HubSpokeRepSet"
  205. );
  206. &FRSSUP::AddToSet("SET", $__HashRef);
  207. ## CREATE_HUB_SPOKE(/HUBSET=<HUB>
  208. ## /BCHSET=<BCH>
  209. ## /SC1=<PRIMARY_SCH>
  210. ## /REPSETDN=<SET>)
  211. &CREATE_HUB_SPOKE (
  212. HUBSET=>&FRSSUP::SelectSet(HUB), BCHSET=>&FRSSUP::SelectSet(BCH), SC1=>&FRSSUP::SelectSet(PRIMARY_SCH)->[0], REPSETDN=>&FRSSUP::SelectSet(SET)->[0] );
  213. __END__