Skip to content

Commit 76b34fd

Browse files
author
Hovsep
committed
Merge pull request Azure#1800 from jamestao/dev
Adding newer Service Objectives to TSqlConnectionContext
2 parents b3fe985 + 210d100 commit 76b34fd

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/TSqlConnectionContext.cs

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,33 @@ public ServiceObjective[] GetServiceObjectives()
659659
Name = "P3"
660660
},
661661
new ServiceObjective()
662+
{
663+
Context = this,
664+
Enabled = true,
665+
Id = new Guid("afe1eee1-1f12-4e5f-9ad6-2de9c12cb4dc"),
666+
IsDefault = false,
667+
IsSystem = false,
668+
Name = "P4"
669+
},
670+
new ServiceObjective()
671+
{
672+
Context = this,
673+
Enabled = true,
674+
Id = new Guid("43940481-9191-475a-9dba-6b505615b9aa"),
675+
IsDefault = false,
676+
IsSystem = false,
677+
Name = "P6"
678+
},
679+
new ServiceObjective()
680+
{
681+
Context = this,
682+
Enabled = true,
683+
Id = new Guid("dd00d544-bbc0-4f61-ba60-cdce0c410288"),
684+
IsDefault = false,
685+
IsSystem = false,
686+
Name = "P11"
687+
},
688+
new ServiceObjective()
662689
{
663690
Context = this,
664691
Enabled = true,
@@ -837,16 +864,22 @@ private void GetDatabaseProperties(Database db)
837864
}
838865
}
839866
}
867+
840868
if (db.MaxSizeBytes.HasValue)
841869
{
842870
db.MaxSizeGB = (int)(db.MaxSizeBytes / (1024 * 1024 * 1024));
843871
}
872+
844873
if (!string.IsNullOrEmpty(db.ServiceObjectiveName))
845874
{
846875
db.ServiceObjective = GetServiceObjective(db.ServiceObjectiveName);
847-
db.ServiceObjectiveId = db.ServiceObjective.Id;
876+
if (db.ServiceObjective != null)
877+
{
878+
db.ServiceObjectiveId = db.ServiceObjective.Id;
879+
}
848880
}
849881

882+
850883
builder["Database"] = null;
851884
}
852885

0 commit comments

Comments
 (0)