Skip to content

Commit fd9b930

Browse files
author
OpenShift Bot
committed
Merge pull request #3746 from spadgett/update-server-type-map
Merged by openshift-bot
2 parents 14ea304 + cfb27f9 commit fd9b930

File tree

2 files changed

+135
-22
lines changed

2 files changed

+135
-22
lines changed

assets/app/scripts/services/data.js

+71-11
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,19 @@ angular.module('openshiftConsole')
219219
}
220220

221221
objects.forEach(function(object) {
222-
self.create(self._objectType(object.kind), null, object, context, opts).then(
222+
var type = self._objectType(object.kind);
223+
if (!type) {
224+
failureResults.push({
225+
data: {
226+
message: "Unrecognized type: " + object.kind + "."
227+
}
228+
});
229+
remaining--;
230+
_checkDone();
231+
return;
232+
}
233+
234+
self.create(type, null, object, context, opts).then(
223235
function (data) {
224236
successResults.push(data);
225237
remaining--;
@@ -814,33 +826,55 @@ angular.module('openshiftConsole')
814826
// an introspection endpoint that would give us this mapping
815827
// https://github.com/openshift/origin/issues/230
816828
var SERVER_TYPE_MAP = {
817-
builds: API_CFG.openshift,
818829
buildconfigs: API_CFG.openshift,
830+
builds: API_CFG.openshift,
831+
clusternetworks: API_CFG.openshift,
832+
clusterpolicies: API_CFG.openshift,
833+
clusterpolicybindings: API_CFG.openshift,
834+
clusterrolebindings: API_CFG.openshift,
835+
clusterroles: API_CFG.openshift,
836+
deploymentconfigrollbacks: API_CFG.openshift,
819837
deploymentconfigs: API_CFG.openshift,
820-
imagestreams: API_CFG.openshift,
838+
hostsubnets: API_CFG.openshift,
839+
identities: API_CFG.openshift,
840+
images: API_CFG.openshift,
821841
imagestreamimages: API_CFG.openshift,
842+
imagestreammappings: API_CFG.openshift,
843+
imagestreams: API_CFG.openshift,
822844
imagestreamtags: API_CFG.openshift,
823845
oauthaccesstokens: API_CFG.openshift,
824846
oauthauthorizetokens: API_CFG.openshift,
825-
oauthclients: API_CFG.openshift,
826847
oauthclientauthorizations: API_CFG.openshift,
848+
oauthclients: API_CFG.openshift,
827849
policies: API_CFG.openshift,
828850
policybindings: API_CFG.openshift,
829851
processedtemplates: API_CFG.openshift,
830-
projects: API_CFG.openshift,
831852
projectrequests: API_CFG.openshift,
832-
roles: API_CFG.openshift,
853+
projects: API_CFG.openshift,
854+
resourceaccessreviews: API_CFG.openshift,
833855
rolebindings: API_CFG.openshift,
856+
roles: API_CFG.openshift,
834857
routes: API_CFG.openshift,
858+
subjectaccessreviews: API_CFG.openshift,
835859
templates: API_CFG.openshift,
860+
useridentitymappings: API_CFG.openshift,
836861
users: API_CFG.openshift,
837862

863+
bindings: API_CFG.k8s,
864+
componentstatuses: API_CFG.k8s,
865+
endpoints: API_CFG.k8s,
838866
events: API_CFG.k8s,
867+
limitranges: API_CFG.k8s,
868+
nodes: API_CFG.k8s,
869+
persistentvolumeclaims: API_CFG.k8s,
870+
persistentvolumes: API_CFG.k8s,
839871
pods: API_CFG.k8s,
872+
podtemplates: API_CFG.k8s,
840873
replicationcontrollers: API_CFG.k8s,
841-
services: API_CFG.k8s,
842874
resourcequotas: API_CFG.k8s,
843-
limitranges: API_CFG.k8s
875+
secrets: API_CFG.k8s,
876+
serviceaccounts: API_CFG.k8s,
877+
services: API_CFG.k8s
844878
};
845879

846880
DataService.prototype._urlForType = function(type, id, context, isWebsocket, params) {
@@ -936,25 +970,51 @@ angular.module('openshiftConsole')
936970
var OBJECT_KIND_MAP = {
937971
Build: "builds",
938972
BuildConfig: "buildconfigs",
973+
ClusterNetwork: "clusternetworks",
974+
ClusterPolicy: "clusterpolicies",
975+
ClusterPolicyBinding: "clusterpolicybindings",
976+
ClusterRole: "clusterroles",
977+
ClusterRoleBinding: "clusterrolebindings",
939978
DeploymentConfig: "deploymentconfigs",
979+
DeploymentConfigRollback: "deploymentconfigrollbacks",
980+
HostSubnet: "hostsubnets",
981+
Identity: "identities",
982+
Image: "images",
940983
ImageStream: "imagestreams",
984+
ImageStreamImage: "imagestreamimages",
985+
ImageStreamMapping: "imagestreammappings",
941986
OAuthAccessToken: "oauthaccesstokens",
942987
OAuthAuthorizeToken: "oauthauthorizetokens",
943988
OAuthClient: "oauthclients",
944989
OAuthClientAuthorization: "oauthclientauthorizations",
945990
Policy: "policies",
946991
PolicyBinding: "policybindings",
947992
Project: "projects",
993+
ProjectRequest: "projectrequests",
994+
ResourceAccessReview: "resourceaccessreviews",
948995
Role: "roles",
949996
RoleBinding: "rolebindings",
950997
Route: "routes",
998+
SubjectAccessReview: "subjectaccessreviews",
999+
Template: "templates",
9511000
User: "users",
952-
1001+
UserIdentityMapping: "useridentitymappings",
1002+
1003+
Binding: "bindings",
1004+
ComponentStatus: "componentstatuses",
1005+
Endpoints: "endpoints",
1006+
Event: "events",
1007+
LimitRange: "limitranges",
1008+
Node: "nodes",
1009+
PersistentVolume: "persistentvolumes",
1010+
PersistentVolumeClaim: "persistentvolumeclaims",
9531011
Pod: "pods",
1012+
PodTemplate: "podtemplates",
9541013
ReplicationController: "replicationcontrollers",
955-
Service: "services",
9561014
ResourceQuota: "resourcequotas",
957-
LimitRange: "limitranges"
1015+
Secret: "secrets",
1016+
Service: "services",
1017+
ServiceAccount: "serviceaccounts"
9581018
};
9591019

9601020
DataService.prototype._objectType = function(kind) {

pkg/assets/bindata.go

+64-11
Original file line numberDiff line numberDiff line change
@@ -13725,11 +13725,16 @@ failure:h
1372513725
}
1372613726
var f = d.defer(), g = [], h = [], i = this, j = a.length;
1372713727
return a.forEach(function(a) {
13728-
i.create(i._objectType(a.kind), null, a, b, c).then(function(a) {
13728+
var d = i._objectType(a.kind);
13729+
return d ? void i.create(d, null, a, b, c).then(function(a) {
1372913730
g.push(a), j--, e();
1373013731
}, function(a) {
1373113732
h.push(a), j--, e();
13732-
});
13733+
}) :(h.push({
13734+
data:{
13735+
message:"Unrecognized type: " + a.kind + "."
13736+
}
13737+
}), j--, void e());
1373313738
}), f.promise;
1373413739
}, i.prototype.get = function(b, e, g, h) {
1373513740
b = void 0 !== this._objectType(b) ? this._objectType(b) :m(b), h = h || {};
@@ -13935,32 +13940,54 @@ g.log("Rewatching for type/context", a, b), this._watchInFlight(a, b, !0), setTi
1393513940
var o = "{protocol}://{+serverUrl}{+apiPrefix}/{apiVersion}/", p = o + "watch/{type}{?q*}", q = o + "{type}{?q*}", r = o + "{type}/{id}{?q*}", s = o + "{type}/{id}{/subresource*}{?q*}", t = o + "watch/namespaces/{namespace}/{type}{?q*}", u = o + "namespaces/{namespace}/{type}{?q*}", v = o + "namespaces/{namespace}/{type}/{id}{?q*}", w = o + "namespaces/{namespace}/{type}/{id}{/subresource*}{?q*}";
1393613941
e.openshift.version = "v1beta3", e.k8s.version = "v1beta3";
1393713942
var x = {
13938-
builds:e.openshift,
1393913943
buildconfigs:e.openshift,
13944+
builds:e.openshift,
13945+
clusternetworks:e.openshift,
13946+
clusterpolicies:e.openshift,
13947+
clusterpolicybindings:e.openshift,
13948+
clusterrolebindings:e.openshift,
13949+
clusterroles:e.openshift,
13950+
deploymentconfigrollbacks:e.openshift,
1394013951
deploymentconfigs:e.openshift,
13941-
imagestreams:e.openshift,
13952+
hostsubnets:e.openshift,
13953+
identities:e.openshift,
13954+
images:e.openshift,
1394213955
imagestreamimages:e.openshift,
13956+
imagestreammappings:e.openshift,
13957+
imagestreams:e.openshift,
1394313958
imagestreamtags:e.openshift,
1394413959
oauthaccesstokens:e.openshift,
1394513960
oauthauthorizetokens:e.openshift,
13946-
oauthclients:e.openshift,
1394713961
oauthclientauthorizations:e.openshift,
13962+
oauthclients:e.openshift,
1394813963
policies:e.openshift,
1394913964
policybindings:e.openshift,
1395013965
processedtemplates:e.openshift,
13951-
projects:e.openshift,
1395213966
projectrequests:e.openshift,
13953-
roles:e.openshift,
13967+
projects:e.openshift,
13968+
resourceaccessreviews:e.openshift,
1395413969
rolebindings:e.openshift,
13970+
roles:e.openshift,
1395513971
routes:e.openshift,
13972+
subjectaccessreviews:e.openshift,
1395613973
templates:e.openshift,
13974+
useridentitymappings:e.openshift,
1395713975
users:e.openshift,
13976+
bindings:e.k8s,
13977+
componentstatuses:e.k8s,
13978+
endpoints:e.k8s,
1395813979
events:e.k8s,
13980+
limitranges:e.k8s,
13981+
nodes:e.k8s,
13982+
persistentvolumeclaims:e.k8s,
13983+
persistentvolumes:e.k8s,
1395913984
pods:e.k8s,
13985+
podtemplates:e.k8s,
1396013986
replicationcontrollers:e.k8s,
13961-
services:e.k8s,
1396213987
resourcequotas:e.k8s,
13963-
limitranges:e.k8s
13988+
secrets:e.k8s,
13989+
serviceaccounts:e.k8s,
13990+
services:e.k8s
1396413991
};
1396513992
i.prototype._urlForType = function(a, b, c, d, e) {
1396613993
var f, h;
@@ -13993,24 +14020,50 @@ return null;
1399314020
var y = {
1399414021
Build:"builds",
1399514022
BuildConfig:"buildconfigs",
14023+
ClusterNetwork:"clusternetworks",
14024+
ClusterPolicy:"clusterpolicies",
14025+
ClusterPolicyBinding:"clusterpolicybindings",
14026+
ClusterRole:"clusterroles",
14027+
ClusterRoleBinding:"clusterrolebindings",
1399614028
DeploymentConfig:"deploymentconfigs",
14029+
DeploymentConfigRollback:"deploymentconfigrollbacks",
14030+
HostSubnet:"hostsubnets",
14031+
Identity:"identities",
14032+
Image:"images",
1399714033
ImageStream:"imagestreams",
14034+
ImageStreamImage:"imagestreamimages",
14035+
ImageStreamMapping:"imagestreammappings",
1399814036
OAuthAccessToken:"oauthaccesstokens",
1399914037
OAuthAuthorizeToken:"oauthauthorizetokens",
1400014038
OAuthClient:"oauthclients",
1400114039
OAuthClientAuthorization:"oauthclientauthorizations",
1400214040
Policy:"policies",
1400314041
PolicyBinding:"policybindings",
1400414042
Project:"projects",
14043+
ProjectRequest:"projectrequests",
14044+
ResourceAccessReview:"resourceaccessreviews",
1400514045
Role:"roles",
1400614046
RoleBinding:"rolebindings",
1400714047
Route:"routes",
14048+
SubjectAccessReview:"subjectaccessreviews",
14049+
Template:"templates",
1400814050
User:"users",
14051+
UserIdentityMapping:"useridentitymappings",
14052+
Binding:"bindings",
14053+
ComponentStatus:"componentstatuses",
14054+
Endpoints:"endpoints",
14055+
Event:"events",
14056+
LimitRange:"limitranges",
14057+
Node:"nodes",
14058+
PersistentVolume:"persistentvolumes",
14059+
PersistentVolumeClaim:"persistentvolumeclaims",
1400914060
Pod:"pods",
14061+
PodTemplate:"podtemplates",
1401014062
ReplicationController:"replicationcontrollers",
14011-
Service:"services",
1401214063
ResourceQuota:"resourcequotas",
14013-
LimitRange:"limitranges"
14064+
Secret:"secrets",
14065+
Service:"services",
14066+
ServiceAccount:"serviceaccounts"
1401414067
};
1401514068
i.prototype._objectType = function(a) {
1401614069
return y[a];

0 commit comments

Comments
 (0)