Skip to content

Commit

Permalink
Move mocked templates to openshift namespace. (kubevirt#203)
Browse files Browse the repository at this point in the history
Use ProjectModel instead of NamespaceModel when requesting resources.
  • Loading branch information
rawagner committed Feb 4, 2019
1 parent f1844b1 commit 345a58d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/k8s/mock_templates/fedora28.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const fedora28 = {
kind: 'Template',
metadata: {
name: 'fedora-generic',
namespace: 'default',
namespace: 'openshift',
annotations: {
'openshift.io/display-name': 'Fedora 23+ VM',
description:
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/mock_templates/rhel-high-p.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const rhelHighPerformance = {
kind: 'Template',
metadata: {
name: 'rhel-high-performance',
namespace: 'default',
namespace: 'openshift',
annotations: {
'openshift.io/display-name': 'Red Hat Enterprise Linux 7.0+ VM High Performance',
description:
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/mock_templates/rhel75.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const rhel75 = {
kind: 'Template',
metadata: {
name: 'rhel-generic',
namespace: 'default',
namespace: 'openshift',
annotations: {
'openshift.io/display-name': 'Red Hat Enterprise Linux 7.0+ VM',
description:
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/mock_templates/ubuntu1804.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const ubuntu1804 = {
kind: 'Template',
metadata: {
name: 'ubuntu1804',
namespace: 'default',
namespace: 'openshift',
annotations: {
'openshift.io/display-name': 'Ubuntu 18.04 (Xenial Xerus) VM',
description:
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/mock_templates/windows.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const windows = {
kind: 'Template',
metadata: {
name: 'win2k12r2',
namespace: 'default',
namespace: 'openshift',
annotations: {
'openshift.io/display-name': 'Microsoft Windows Server 2012 R2 VM',
description:
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/tests/request.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ describe('request.js - metadata', () => {
basicSettingsContainer[OPERATING_SYSTEM_KEY].value,
basicSettingsContainer[WORKLOAD_PROFILE_KEY].value,
basicSettingsContainer[FLAVOR_KEY].value,
'default_rhel-generic'
'openshift_rhel-generic'
);
return results;
}));
Expand Down
2 changes: 1 addition & 1 deletion src/utils/tests/templates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe('templates.js', () => {
const vm = {
metadata: {
labels: {
[ANNOTATION_USED_TEMPLATE]: 'default_fedora-generic',
[ANNOTATION_USED_TEMPLATE]: 'openshift_fedora-generic',
},
},
};
Expand Down
1 change: 1 addition & 0 deletions src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
TEMPLATE_FLAVOR_LABEL,
} from '../constants';
import { NETWORK_TYPE_POD } from '../components/Wizard/CreateVmWizard/constants';
import { NamespaceModel, ProjectModel } from '../models';

export function prefixedId(idPrefix, id) {
return idPrefix && id ? `${idPrefix}-${id}` : null;
Expand Down

0 comments on commit 345a58d

Please sign in to comment.