1
/* ============================================================================
2
Copyright 2014 Hewlett Packard
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
8
http://www.apache.org/licenses/LICENSE-2.0
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
============================================================================ */
16
using System.Collections.Generic;
17
using Openstack.Administration.Domain;
18
using System.Collections;
19
using Openstack.Client.Powershell.Providers.Common;
20
using Openstack.Objects.Domain.Compute;
21
using Openstack.Objects.Domain;
23
namespace Openstack.Client.Powershell.Providers.Compute
25
public class KeyPairsUIContainer : BaseUIContainer
27
//=========================================================================================================
31
/// <param name="name"></param>
32
/// <param name="description"></param>
33
/// <param name="path"></param>
34
//=========================================================================================================
35
public KeyPairsUIContainer(BaseUIContainer parentContainer,
39
: base(parentContainer, name, description, path)
41
this.ObjectType = ObjectType.Container;
43
public KeyPairsUIContainer()
46
//=========================================================================================================
50
/// <typeparam name="T"></typeparam>
51
/// <returns></returns>
52
//=========================================================================================================
53
public override void Load()
55
IList keypairs = this.RepositoryFactory.CreateKeyPairRepository().GetKeyPairs();
56
if (keypairs != null && keypairs.Count > 0)
58
this.SetUIContainers<ImageUIContainer>(keypairs);
59
this.Entities = keypairs;
63
this.Containers.Clear();
64
this.Entities.Clear();