@@ -820,14 +820,9 @@ func (service *httpRestService) setOrchestratorType(w http.ResponseWriter, r *ht
820820 service .lock .Lock ()
821821
822822 switch req .OrchestratorType {
823- case cns .Kubernetes :
824- service .state .OrchestratorType = cns . Kubernetes
823+ case cns .ServiceFabric , cns . Kubernetes , cns . WebApps :
824+ service .state .OrchestratorType = req . OrchestratorType
825825 service .saveState ()
826- break
827- case cns .WebApps :
828- service .state .OrchestratorType = cns .WebApps
829- service .saveState ()
830- break
831826 default :
832827 returnMessage = fmt .Sprintf ("Invalid Orchestrator type %v" , req .OrchestratorType )
833828 returnCode = UnsupportedOrchestratorType
@@ -866,13 +861,14 @@ func (service *httpRestService) saveNetworkContainerGoalState(req cns.CreateNetw
866861 CreateNetworkContainerRequest : req ,
867862 HostVersion : hostVersion }
868863
869- if req .NetworkContainerType == cns .AzureContainerInstance {
864+ if req .NetworkContainerType == cns .AzureContainerInstance ||
865+ req .NetworkContainerType == cns .ClearContainer {
870866 switch service .state .OrchestratorType {
871- case cns .Kubernetes :
867+ case cns .Kubernetes , cns . ServiceFabric :
872868 var podInfo cns.KubernetesPodInfo
873869 err := json .Unmarshal (req .OrchestratorContext , & podInfo )
874870 if err != nil {
875- errBuf := fmt .Sprintf ("Unmarshalling AzureContainerInstanceInfo failed with error %v" , err )
871+ errBuf := fmt .Sprintf ("Unmarshalling %s failed with error %v" , req . NetworkContainerType , err )
876872 return UnexpectedError , errBuf
877873 }
878874
@@ -980,7 +976,7 @@ func (service *httpRestService) getNetworkContainerResponse(req cns.GetNetworkCo
980976 defer service .lock .Unlock ()
981977
982978 switch service .state .OrchestratorType {
983- case cns .Kubernetes :
979+ case cns .Kubernetes , cns . ServiceFabric :
984980 var podInfo cns.KubernetesPodInfo
985981 err := json .Unmarshal (req .OrchestratorContext , & podInfo )
986982 if err != nil {
0 commit comments