Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » Ims

Public general use code classes and xml files that we've compiled and used over the years:

Optical Fiber Network Management Intranet Portal (OFN) support class for Next Generation Network (NGN) business model

   1:  using System;
   2:  using System.Collections;
   3:  using System.Collections.Generic;
   4:  using System.Configuration;
   5:  using System.Linq;
   6:  using System.Web;
   7:  using System.Text;
   8:  using System.Text.RegularExpressions;
   9:  using System.Xml;
  10:  using System.Data.Entity;
  11:   
  12:  namespace Ia.Ngn.Cl.Model.Business
  13:  {
  14:      ////////////////////////////////////////////////////////////////////////////
  15:   
  16:      /// <summary publish="true">
  17:      /// Optical Fiber Network Management Intranet Portal (OFN) support class for Next Generation Network (NGN) business model
  18:      /// </summary>
  19:      /// 
  20:      /// <value>
  21:      ///   <appSettings>
  22:      ///     <add key="imsHuaweiServerHost" value="https://*" />
  23:      ///     <add key="imsHuaweiServerPort" value="*" />
  24:      ///     <add key="imsHuaweiServerServiceUrl" value="*" />
  25:      ///     <add key="imsHuaweiServerUser" value="*" />
  26:      ///     <add key="imsHuaweiServerUserPassword" value="*" />
  27:      ///   </appSettings>
  28:      /// </value>
  29:      /// 
  30:      /// <remarks> 
  31:      /// Copyright © 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  32:      ///
  33:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  34:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  35:      ///
  36:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  37:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  38:      /// 
  39:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  40:      /// 
  41:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  42:      /// </remarks> 
  43:      public class Ims
  44:      {
  45:          public class ImsBasicService
  46:          {
  47:              public string MgcIp;
  48:              public string MgcSecondaryIp;
  49:              public string MgcSubnetMask;
  50:              public int Service;
  51:              public string Fsdb;
  52:              public string PrimarySwitch;
  53:          }
  54:   
  55:          ////////////////////////////////////////////////////////////////////////////
  56:   
  57:          /// <summary>
  58:          ///
  59:          /// </summary>
  60:          public Ims()
  61:          {
  62:          }
  63:   
  64:          ////////////////////////////////////////////////////////////////////////////
  65:   
  66:          /// <summary>
  67:          ///
  68:          /// </summary>
  69:          public static int NextVacantFlatTermIdFromAgcfEndpointUsingGwIdForOnt(Ia.Ngn.Cl.Model.Business.Huawei.Ont.EquipmentType familyType, int gwId)
  70:          {
  71:              int ft;
  72:              List<int> list;
  73:   
  74:              list = Ia.Ngn.Cl.Model.Data.Nokia.AgcfEndpoint.UsedFlatTermIdListForGatewayId(gwId);
  75:   
  76:              if (list.Count == 0) ft = 1; // this means agcfEndpoint does not exist for any number and the box is empty, and we should create agcfEndpoint at 1
  77:              else
  78:              {
  79:                  // change this later to accommodate the Huawei ONT type
  80:                  list = Ia.Cl.Model.Default.ExcludedNumberListFromNumberListWithinRange(list, Ia.Ngn.Cl.Model.Business.Huawei.Ems.PossibleNumberOfTdForOntEquipmentType(familyType));
  81:   
  82:                  if (list.Count > 0) ft = list[0];
  83:                  else ft = 0; // something went wrong
  84:              }
  85:   
  86:              return ft;
  87:          }
  88:   
  89:          /*
  90:          ////////////////////////////////////////////////////////////////////////////
  91:  
  92:          /// <summary>
  93:          ///
  94:          /// </summary>
  95:          public static Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService OldNokiaImsBasicServiceItem(Ia.Ngn.Cl.Model.Data.OldNetworkDesignDocument.Ont ont)
  96:          {
  97:              string mgcIp, fsdb;
  98:              Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService imsBasicService;
  99:              Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService nokiaImsBasicService;
 100:  
 101:              mgcIp = ont.Pon.Olt.MgcIp;
 102:  
 103:              nokiaImsBasicService = (from ibs in Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceList where ibs.MgcIp == mgcIp select ibs).Single();
 104:  
 105:              // Fsdb will always be "fsdb0" for *any* ONT (event if it was an MDU) that has a PBX SERVICEBUNDLE2 category. I will check to see if this ONT has any PBX before I assign the fsdb value to it.
 106:              fsdb = (OntHasAPbxDesignatedSubParty(ont.Ip)) ? "fsdb0" : nokiaImsBasicService.Fsdb;
 107:  
 108:              imsBasicService = new ImsBasicService()
 109:              {
 110:                  PrimarySwitch = nokiaImsBasicService.PrimarySwitch,
 111:                  Fsdb = fsdb,
 112:                  MgcIp = nokiaImsBasicService.MgcIp,
 113:                  MgcSecondaryIp = nokiaImsBasicService.MgcSecondaryIp,
 114:                  MgcSubnetMask = nokiaImsBasicService.MgcSubnetMask,
 115:                  Service = nokiaImsBasicService.Service
 116:              };
 117:  
 118:              return imsBasicService;
 119:          }
 120:          */
 121:   
 122:          ////////////////////////////////////////////////////////////////////////////
 123:   
 124:          /// <summary>
 125:          ///
 126:          /// </summary>
 127:          public static Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService NokiaImsBasicServiceItem(Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont ont)
 128:          {
 129:              string mgcIp, fsdb;
 130:              Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService imsBasicService;
 131:              Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService nokiaImsBasicService;
 132:   
 133:              mgcIp = ont.Pon.PonGroup.MgcIp;
 134:   
 135:              nokiaImsBasicService = (from ibs in Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceList where ibs.MgcIp == mgcIp select ibs).Single();
 136:   
 137:              // Fsdb will always be "fsdb0" for *any* ONT (event if it was an MDU) that has a PBX SERVICEBUNDLE2 category. I will check to see if this ONT has any PBX before I assign the fsdb value to it.
 138:              fsdb = (OntHasAPbxDesignatedSubParty(ont.Ip)) ? "fsdb0" : nokiaImsBasicService.Fsdb;
 139:   
 140:              imsBasicService = new ImsBasicService()
 141:              {
 142:                  PrimarySwitch = nokiaImsBasicService.PrimarySwitch,
 143:                  Fsdb = fsdb,
 144:                  MgcIp = nokiaImsBasicService.MgcIp,
 145:                  MgcSecondaryIp = nokiaImsBasicService.MgcSecondaryIp,
 146:                  MgcSubnetMask = nokiaImsBasicService.MgcSubnetMask,
 147:                  Service = nokiaImsBasicService.Service
 148:              };
 149:   
 150:              return imsBasicService;
 151:          }
 152:   
 153:          ////////////////////////////////////////////////////////////////////////////
 154:   
 155:          /// <summary>
 156:          ///
 157:          /// </summary>
 158:          public static bool OntHasAPbxDesignatedSubParty(string ip)
 159:          {
 160:              bool hasPbx;
 161:              List<string> list;
 162:   
 163:              list = new List<string>();
 164:   
 165:              list = Ia.Ngn.Cl.Model.Data.Nokia.Ims.AgcfGatewayRecordsWithinWhichSubPartiesHaveServiceBundle2CategoryList;
 166:   
 167:              if (list.Count > 0) hasPbx = list.Contains(ip);
 168:              else hasPbx = false;
 169:   
 170:              return hasPbx;
 171:          }
 172:   
 173:          ////////////////////////////////////////////////////////////////////////////
 174:   
 175:          /// <summary>
 176:          ///
 177:          /// </summary>
 178:          public static Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService HuaweiImsBasicServiceItem(string mgcIp)
 179:          {
 180:              Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService imsBasicService;
 181:              Ia.Ngn.Cl.Model.Business.Huawei.Ims.ImsBasicService huaweiImsBasicService;
 182:   
 183:              huaweiImsBasicService = (from ibs in Ia.Ngn.Cl.Model.Business.Huawei.Ims.ImsBasicServiceList where ibs.MgcIp == mgcIp select ibs).Single();
 184:   
 185:              imsBasicService = new ImsBasicService()
 186:              {
 187:                  PrimarySwitch = huaweiImsBasicService.PrimarySwitch,
 188:                  Fsdb = huaweiImsBasicService.Fsdb,
 189:                  MgcIp = huaweiImsBasicService.MgcIp,
 190:                  MgcSecondaryIp = huaweiImsBasicService.MgcSecondaryIp,
 191:                  MgcSubnetMask = huaweiImsBasicService.MgcSubnetMask,
 192:                  Service = huaweiImsBasicService.Service
 193:              };
 194:   
 195:              return imsBasicService;
 196:          }
 197:   
 198:          /*
 199:          ////////////////////////////////////////////////////////////////////////////
 200:  
 201:          /// <summary>
 202:          ///
 203:          /// </summary>
 204:          public static Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService OldSpecialHuaweiIpHandlingForNokiaImsBasicServiceItem(Ia.Ngn.Cl.Model.Data.OldNetworkDesignDocument.Ont nddOnt)
 205:          {
 206:              Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService imsBasicService;
 207:              Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService nokiaImsBasicService;
 208:  
 209:              if (nddOnt.Pon.Olt.Odf.Name == "SAA")
 210:              {
 211:                  /*
 212:                   * SAA:
 213:                   * Cable        MGC Primary IP  MGC Secondary
 214:                   * Cable 5        10.16.1.38        10.16.5.38
 215:                   * Cable 6        10.16.1.34        10.16.5.34
 216:                   * Cable 7        10.16.1.31        10.16.5.31
 217:                   * Cable 8        10.16.1.33        10.16.5.33
 218:                   * /
 219:  
 220:                  if (Ia.Ngn.Cl.Model.Data.Huawei.Default.ListOfHuaweiOntThatWereIntiallyInstalledAndProvisionedWithNokiaMgcIp10_16_5_37BeforeNewMgcIpToCableDistributionAgreement.Contains(nddOnt.Access.Name))
 221:                  {
 222:                      nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.37");
 223:                  }
 224:                  else if (nddOnt.Pon.Number >= 500 && nddOnt.Pon.Number < 600) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.38");
 225:                  else if (nddOnt.Pon.Number >= 600 && nddOnt.Pon.Number < 700) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.34");
 226:                  else if (nddOnt.Pon.Number >= 700 && nddOnt.Pon.Number < 800) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.31");
 227:                  else if (nddOnt.Pon.Number >= 800 && nddOnt.Pon.Number < 900) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.33");
 228:                  // below: fake
 229:                  else if (nddOnt.Pon.Number >= 900 && nddOnt.Pon.Number < 1000) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.33");
 230:                  else
 231:                  {
 232:                      throw new Exception("Huawei imsBasicService undefined for access: " + nddOnt.Access.Name + ". ");
 233:                  }
 234:              }
 235:              else if (nddOnt.Pon.Olt.Odf.Name == "SDQ")
 236:              {
 237:                  /*
 238:                   * SDQ:
 239:                   * Cable        MGC Primary IP  MGC Secondary
 240:                   * Cable 7      10.16.5.32    10.16.1.32
 241:                   * Cable 8        10.16.5.35    10.16.1.35
 242:                   * Cable 9        10.16.5.36    10.16.1.36
 243:                   * /
 244:  
 245:                  if (nddOnt.Pon.Number >= 700 && nddOnt.Pon.Number < 800) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.32");
 246:                  else if (nddOnt.Pon.Number >= 800 && nddOnt.Pon.Number < 900) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.35");
 247:                  else if (nddOnt.Pon.Number >= 900 && nddOnt.Pon.Number < 1000) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.36");
 248:                  else
 249:                  {
 250:                      throw new Exception("Huawei imsBasicService undefined for access: " + nddOnt.Access.Name + ". ");
 251:                  }
 252:              }
 253:              else if (nddOnt.Pon.Olt.Odf.Name == "MSF")
 254:              {
 255:                  /*
 256:                   * MSF:
 257:                   * Cable        MGC Primary IP  MGC Secondary
 258:                   * Cable 1      10.16.5.31    10.16.1.31
 259:                   * /
 260:  
 261:                  if (nddOnt.Pon.Number >= 1 && nddOnt.Pon.Number <= 256) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.31");
 262:                  else
 263:                  {
 264:                      throw new Exception("Huawei imsBasicService undefined for access: " + nddOnt.Access.Name + ". ");
 265:                  }
 266:              }
 267:              // else if (nddOnt.Pon.PonGroup.Olt.Odf.Name == "BYN") { }
 268:              else
 269:              {
 270:                  nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem(nddOnt.Pon.Olt.MgcIp);
 271:              }
 272:  
 273:              imsBasicService = new ImsBasicService()
 274:              {
 275:                  PrimarySwitch = nokiaImsBasicService.PrimarySwitch,
 276:                  Fsdb = nokiaImsBasicService.Fsdb,
 277:                  MgcIp = nokiaImsBasicService.MgcIp,
 278:                  MgcSecondaryIp = nokiaImsBasicService.MgcSecondaryIp,
 279:                  MgcSubnetMask = nokiaImsBasicService.MgcSubnetMask,
 280:                  Service = nokiaImsBasicService.Service
 281:              };
 282:  
 283:              return imsBasicService;
 284:          }
 285:      */
 286:   
 287:          ////////////////////////////////////////////////////////////////////////////
 288:   
 289:          /// <summary>
 290:          ///
 291:          /// </summary>
 292:          public static Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService SpecialHuaweiIpHandlingForNokiaImsBasicServiceItem(Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt)
 293:          {
 294:              Ia.Ngn.Cl.Model.Business.Ims.ImsBasicService imsBasicService;
 295:              Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService nokiaImsBasicService;
 296:   
 297:              if (nddOnt.Pon.PonGroup.Olt.Odf.Name == "SAA")
 298:              {
 299:                  /*
 300:                   * SAA:
 301:                   * Cable        MGC Primary IP  MGC Secondary
 302:                   * Cable 5        10.16.1.38        10.16.5.38
 303:                   * Cable 6        10.16.1.34        10.16.5.34
 304:                   * Cable 7        10.16.1.31        10.16.5.31
 305:                   * Cable 8        10.16.1.33        10.16.5.33
 306:                   */
 307:   
 308:                  if (Ia.Ngn.Cl.Model.Data.Huawei.Default.ListOfHuaweiOntThatWereIntiallyInstalledAndProvisionedWithNokiaMgcIp10_16_5_37BeforeNewMgcIpToCableDistributionAgreement.Contains(nddOnt.Access.Name))
 309:                  {
 310:                      nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.37");
 311:                  }
 312:                  else if (nddOnt.Pon.Number >= 500 && nddOnt.Pon.Number < 600) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.38");
 313:                  else if (nddOnt.Pon.Number >= 600 && nddOnt.Pon.Number < 700) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.34");
 314:                  else if (nddOnt.Pon.Number >= 700 && nddOnt.Pon.Number < 800) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.31");
 315:                  else if (nddOnt.Pon.Number >= 800 && nddOnt.Pon.Number < 900) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.33");
 316:                  // below: fake
 317:                  else if (nddOnt.Pon.Number >= 900 && nddOnt.Pon.Number < 1000) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.1.33");
 318:                  else
 319:                  {
 320:                      throw new Exception("Huawei imsBasicService undefined for access: " + nddOnt.Access.Name + ". ");
 321:                  }
 322:              }
 323:              else if (nddOnt.Pon.PonGroup.Olt.Odf.Name == "SDQ")
 324:              {
 325:                  /*
 326:                   * SDQ:
 327:                   * Cable        MGC Primary IP  MGC Secondary
 328:                   * Cable 7      10.16.5.32    10.16.1.32
 329:                   * Cable 8        10.16.5.35    10.16.1.35
 330:                   * Cable 9        10.16.5.36    10.16.1.36
 331:                   */
 332:   
 333:                  if (nddOnt.Pon.Number >= 700 && nddOnt.Pon.Number < 800) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.32");
 334:                  else if (nddOnt.Pon.Number >= 800 && nddOnt.Pon.Number < 900) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.35");
 335:                  else if (nddOnt.Pon.Number >= 900 && nddOnt.Pon.Number < 1000) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.36");
 336:                  else
 337:                  {
 338:                      throw new Exception("Huawei imsBasicService undefined for access: " + nddOnt.Access.Name + ". ");
 339:                  }
 340:              }
 341:              /*
 342:              else if (nddOnt.Pon.PonGroup.Olt.Odf.Name == "MSF")
 343:              {
 344:                  // MSF:
 345:                  // Cable        MGC Primary IP  MGC Secondary
 346:                  // Cable 1      10.16.5.31    10.16.1.31
 347:  
 348:                  if (nddOnt.Pon.Number >= 1 && nddOnt.Pon.Number <= 256) nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem("10.16.5.31");
 349:                  else
 350:                  {
 351:                      throw new Exception("Huawei imsBasicService undefined for access: " + nddOnt.Access.Name + ". ");
 352:                  }
 353:              }
 354:              */
 355:              // else if (nddOnt.Pon.PonGroup.Olt.Odf.Name == "BYN") { }
 356:              else
 357:              {
 358:                  nokiaImsBasicService = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicServiceItem(nddOnt.Pon.PonGroup.MgcIp);
 359:   
 360:                  if (nokiaImsBasicService == null)
 361:                  {
 362:                      /*
 363:                  // below: I think service and fsdb here are meaningless but service must remain unique
 364:                  new ImsBasicService { MgcIp="10.16.1.142", MgcSecondaryIp="10.16.5.142", MgcSubnetMask="255.255.224.0",Service=0,Fsdb=string.Empty,PrimarySwitch=TEC },
 365:  
 366:                  // below: maybe should not be here. service must remain unique
 367:                  new ImsBasicService { MgcIp="10.10.9.254", MgcSecondaryIp="10.10.1.254", MgcSubnetMask="255.255.224.0",Service=0,Fsdb=string.Empty,PrimarySwitch=TEC }, 
 368:  
 369:  
 370:                  // below: I think service and fsdb here are meaningless but service must remain unique
 371:                  new ImsBasicService { MgcIp="10.16.5.142", MgcSecondaryIp="10.16.1.142", MgcSubnetMask="255.255.224.0",Service=0,Fsdb=string.Empty,PrimarySwitch=SKB },
 372:  
 373:                  // below: maybe should not be here. service must remain unique
 374:                  new ImsBasicService { MgcIp="10.10.1.254", MgcSecondaryIp="10.10.9.254", MgcSubnetMask="255.255.224.0",Service=0,Fsdb=string.Empty,PrimarySwitch=SKB },
 375:                       */
 376:   
 377:                      if (nddOnt.Pon.PonGroup.MgcIp == "10.16.1.142")
 378:                      {
 379:                          nokiaImsBasicService = new Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService { MgcIp = "10.16.1.142", MgcSecondaryIp = "10.16.5.142", MgcSubnetMask = "255.255.224.0", Service = 0, Fsdb = string.Empty, PrimarySwitch = Ia.Ngn.Cl.Model.Business.Nokia.Ims.TEC };
 380:                      }
 381:                      else if (nddOnt.Pon.PonGroup.MgcIp == "10.16.5.142")
 382:                      {
 383:                          nokiaImsBasicService = new Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService { MgcIp = "10.16.5.142", MgcSecondaryIp = "10.16.1.142", MgcSubnetMask = "255.255.224.0", Service = 0, Fsdb = string.Empty, PrimarySwitch = Ia.Ngn.Cl.Model.Business.Nokia.Ims.SKB };
 384:                      }
 385:                      else if (nddOnt.Pon.PonGroup.MgcIp == "10.10.9.254")
 386:                      {
 387:                          nokiaImsBasicService = new Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService { MgcIp = "10.10.9.254", MgcSecondaryIp = "10.10.1.254", MgcSubnetMask = "255.255.224.0", Service = 0, Fsdb = string.Empty, PrimarySwitch = Ia.Ngn.Cl.Model.Business.Nokia.Ims.TEC };
 388:                      }
 389:                      else if (nddOnt.Pon.PonGroup.MgcIp == "10.10.1.254")
 390:                      {
 391:                          nokiaImsBasicService = new Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsBasicService { MgcIp = "10.10.1.254", MgcSecondaryIp = "10.10.9.254", MgcSubnetMask = "255.255.224.0", Service = 0, Fsdb = string.Empty, PrimarySwitch = Ia.Ngn.Cl.Model.Business.Nokia.Ims.SKB };
 392:                      }
 393:   
 394:   
 395:                      // Use fixed random to assign fsdb values from fsdb0-fsdb3 randomly to passed area with nddOnt
 396:   
 397:                      switch (Ia.Cl.Model.Default.AlphanumericStringToInt(nddOnt.Pon.PonGroup.Symbol) % 4)
 398:                      {
 399:                          case 0: nokiaImsBasicService.Fsdb = "fsdb0"; break;
 400:                          case 1: nokiaImsBasicService.Fsdb = "fsdb1"; break;
 401:                          case 2: nokiaImsBasicService.Fsdb = "fsdb2"; break;
 402:                          case 3: nokiaImsBasicService.Fsdb = "fsdb3"; break;
 403:                          default: nokiaImsBasicService.Fsdb = "fsdb0"; break;
 404:                      }
 405:   
 406:                      nokiaImsBasicService.Fsdb = "fsdb0";
 407:                  }
 408:              }
 409:   
 410:              imsBasicService = new ImsBasicService()
 411:              {
 412:                  PrimarySwitch = nokiaImsBasicService.PrimarySwitch,
 413:                  Fsdb = nokiaImsBasicService.Fsdb,
 414:                  MgcIp = nokiaImsBasicService.MgcIp,
 415:                  MgcSecondaryIp = nokiaImsBasicService.MgcSecondaryIp,
 416:                  MgcSubnetMask = nokiaImsBasicService.MgcSubnetMask,
 417:                  Service = nokiaImsBasicService.Service
 418:              };
 419:   
 420:              return imsBasicService;
 421:          }
 422:   
 423:          ////////////////////////////////////////////////////////////////////////////
 424:          ////////////////////////////////////////////////////////////////////////////
 425:      }
 426:   
 427:      ////////////////////////////////////////////////////////////////////////////
 428:      ////////////////////////////////////////////////////////////////////////////
 429:  }