Skip to content

Commit

Permalink
Merge pull request #470 from deNBI/dev
Browse files Browse the repository at this point in the history
feat(SecurityGroup):added method to add security grouo to server
  • Loading branch information
dweinholz authored Feb 16, 2024
2 parents 4484e4a + 42a4846 commit a3565df
Show file tree
Hide file tree
Showing 7 changed files with 9,801 additions and 3,207 deletions.
10 changes: 10 additions & 0 deletions portal_client.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct ResearchEnvironmentTemplate{
9: optional map<string,string> information_for_display
10: optional int min_ram = 0
11: optional int min_cores = 0
12: optional string securitygroup_name

}
struct CondaPackage{
Expand Down Expand Up @@ -340,7 +341,16 @@ service VirtualMachineService {

)

/**
* Adds template security group to a server
*/
void add_research_environment_security_group(
/** OpenStack id of the server*/
1:string server_id,2:string security_group_name)

throws (1:DefaultException r,2:ServerNotFoundException s

)
/**
* Add metadata to a server.
* Returns: List of flavor instances.
Expand Down
12 changes: 12 additions & 0 deletions simple_vm_client/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,21 @@ def open_port_range_for_vm_in_project(
protocol=protocol,
)

def add_research_environment_security_group(
self, server_id: str, security_group_name: str
) -> None:
return self.openstack_connector.add_research_environment_security_group(
server_id=server_id, security_group_name=security_group_name
)

def add_udp_security_group(self, server_id: str) -> None:
return self.openstack_connector.add_udp_security_group(server_id=server_id)

def add_metadata_to_server(self, openstack_id: str, metadata):
self.openstack_connector.add_metadata_to_server(
server_id=openstack_id, metadata=metadata
)

def start_server(
self,
flavor_name: str,
Expand Down
Loading

0 comments on commit a3565df

Please sign in to comment.