Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package com.cloud.agent.api;

public class CleanupPersistentNetworkResourceAnswer extends Answer {
public CleanupPersistentNetworkResourceAnswer() {
}

public CleanupPersistentNetworkResourceAnswer(CleanupPersistentNetworkResourceCommand cmd, boolean success, String result) {
super(cmd, success, result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package com.cloud.agent.api;

import com.cloud.agent.api.to.NicTO;

public class CleanupPersistentNetworkResourceCommand extends Command {
NicTO nicTO;

protected CleanupPersistentNetworkResourceCommand() {}

public CleanupPersistentNetworkResourceCommand(NicTO nicTO) {
this.nicTO = nicTO;
}

public NicTO getNicTO() {
return nicTO;
}

public void setNicTO(NicTO nicTO) {
this.nicTO = nicTO;
}

@Override
public boolean executeInSequence() {
return false;
}
}
9 changes: 9 additions & 0 deletions core/src/main/java/com/cloud/agent/api/MigrateCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class MigrateCommand extends Command {
private boolean executeInSequence = false;
private List<MigrateDiskInfo> migrateDiskInfoList = new ArrayList<>();
private Map<String, DpdkTO> dpdkInterfaceMapping = new HashMap<>();
Map<String, Boolean> vlanToPersistenceMap = new HashMap<>();

public Map<String, DpdkTO> getDpdkInterfaceMapping() {
return dpdkInterfaceMapping;
Expand All @@ -49,6 +50,14 @@ public void setDpdkInterfaceMapping(Map<String, DpdkTO> dpdkInterfaceMapping) {
this.dpdkInterfaceMapping = dpdkInterfaceMapping;
}

public Map<String, Boolean> getVlanToPersistenceMap() {
return vlanToPersistenceMap;
}

public void setVlanToPersistenceMap(Map<String, Boolean> vlanToPersistenceMap) {
this.vlanToPersistenceMap = vlanToPersistenceMap;
}

protected MigrateCommand() {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package com.cloud.agent.api;

public class SetupPersistentNetworkAnswer extends Answer {
public SetupPersistentNetworkAnswer(){}

public SetupPersistentNetworkAnswer(SetupPersistentNetworkCommand cmd, boolean success, String result) {
super(cmd, success, result);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package com.cloud.agent.api;

import com.cloud.agent.api.to.NicTO;

public class SetupPersistentNetworkCommand extends Command {

NicTO nic;

public SetupPersistentNetworkCommand(NicTO nic) {
this.nic = nic;
}

public NicTO getNic() {
return nic;
}

protected SetupPersistentNetworkCommand() {
}

@Override
public boolean executeInSequence() {
return false;
}
}
9 changes: 9 additions & 0 deletions core/src/main/java/com/cloud/agent/api/StopCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class StopCommand extends RebootCommand {
String controlIp = null;
boolean forceStop = false;
private Map<String, DpdkTO> dpdkInterfaceMapping;
Map<String, Boolean> vlanToPersistenceMap;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as before, NPE check for consumer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an explicit check done at the consuming end to ensure this isn't null


public Map<String, DpdkTO> getDpdkInterfaceMapping() {
return dpdkInterfaceMapping;
Expand Down Expand Up @@ -129,4 +130,12 @@ public void setVolumesToDisconnect(List<Map<String, String>> volumesToDisconnect
public List<Map<String, String>> getVolumesToDisconnect() {
return volumesToDisconnect;
}

public Map<String, Boolean> getVlanToPersistenceMap() {
return vlanToPersistenceMap;
}

public void setVlanToPersistenceMap(Map<String, Boolean> vlanToPersistenceMap) {
this.vlanToPersistenceMap = vlanToPersistenceMap;
}
}
11 changes: 11 additions & 0 deletions core/src/main/java/com/cloud/agent/api/UnPlugNicCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@

package com.cloud.agent.api;

import java.util.Map;

import com.cloud.agent.api.to.NicTO;

public class UnPlugNicCommand extends Command {
NicTO nic;
String instanceName;
Map<String, Boolean> vlanToPersistenceMap;

public NicTO getNic() {
return nic;
Expand All @@ -45,4 +48,12 @@ public UnPlugNicCommand(NicTO nic, String instanceName) {
public String getVmName() {
return instanceName;
}

public Map<String, Boolean> getVlanToPersistenceMap() {
return vlanToPersistenceMap;
}

public void setVlanToPersistenceMap(Map<String, Boolean> vlanToPersistenceMap) {
this.vlanToPersistenceMap = vlanToPersistenceMap;
}
}
Loading